 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
Posted: Tue Apr 24, 2007 8:15 pm Post subject: Control Where MsgBox Appears? |
|
|
OK, I've got a script created to update addresses in Oracle from a list on an Excel spreadsheet. The problem is that Oracle won't let me plug in city, state, and zip before trying to validate one of those values. What happens is if you put one value in and tab off of it, it will bring up a modal window where you select the correct zip/city etc.
SO... What I've done is created a MsgBox that pops up to ask the user to select the correct city and state after pasting in the zip code and tabbing off. I've set it to always on top so the user doesn't have to alt-tab back to it in order to resume the script. The problem is that it pops up directly over the window where you choose the address... Is there a way to make the MsgBox pop 200 or 300 pixels higher or lower?
| Code: |
Send, %Zip%{TAB}
MsgBox, 4097, Commit Record?, Press OK when you are ready to commit record.`nYou have to select %City%`, %State% from an Oracle window BEFORE PRESSING OK.
IfMsgBox Cancel
{
Blah Blah Bail out of update and send ERROR to spreadsheet
}
Else
{
Blah Blah commit record and send OK to spreadsheet
}
|
_________________ [Join IRC!]
http://www.codeforcure.org/ |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6856 Location: Pacific Northwest, US
|
Posted: Tue Apr 24, 2007 8:26 pm Post subject: |
|
|
can you detect the oracle window and set %city% and %state% yourself?
The script can also start a timer that moves the msgbox somewhere else, but that's a hack. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
MsgBox
Joined: 17 Nov 2005 Posts: 179 Location: Leicester, UK
|
Posted: Tue Apr 24, 2007 8:45 pm Post subject: |
|
|
You can use a timer to watch out for the msgbox then move it.
Have a playabout with this:
| Code: | #Persistent
SetTimer PlaceMsgBox, 100
Sleep 1000
MsgBox,, Move Me!, I've been moved!
PlaceMsgBox:
SetTimer PlaceMsgBox, Off
IfWinExist Move Me!
{
WinMove Move Me!,,0,400
}
SetTimer PlaceMsgBox, On
Return |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|