Post
by kpassaur » Mon Mar 19, 2007 9:13 am
Yes, and I use the code below currently in some of my scripts. Howver,I use it with a loop that keeps the dialog on top and the user can move their mouse and control windows behind the message box.
The way I use it now is for a message box saying "Do this and when finished click on Continue" This allows stoping the script until the user has completed a task that they have to do.
Works great. However the goal here is to keep it on top, and have MS set focus to the window behind to process.
Although, I can use the blockinput feature (nice) to keep the user from messing up the runnning script. While it is running I would like to let them know processing is taking place.
Any ideas? One thought I have is to place the Window on top with one compiled script (using the code below) make the code I want to run a standalone compiled script. Call it from the first, use the Let>RP_Wait=1 command and see if that works.
I am open to suggestions
Dialog>Dialog1
Caption=Dialog1
Top=112
Width=226
Left=16
Height=103
Button=msButton1,32,32,75,25,0
EndDialog>Dialog1
Let>HWND_TOPMOST=-1
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>Flags={%SWP_NOSIZE% OR %SWP_NOMOVE%}
Show>Dialog1
LibFunc>user32,FindWindowA,hwnd,TForm,Dialog1
LibFunc>user32,SetWindowPos,r,hwnd,HWND_TOPMOST,0,0,0,0,Flags
CloseWindow>Dialog1
Show>Dialog1,r