| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri Jan 20, 2006 7:34 pm Post subject: Need help with randomly timed popups ;) |
|
|
The company software I use has popups that come at various times while it is on. My automations work for the most part, due to having settimer cancel these popups, but there comes times where if the script is in mid string or mid mouseclick while the popup is blocked, the string will be chopped up or be sent to the wrong fields.
I need to have a way so that the popups can be blocked while the script lies dormant (mid string if necessary) and then continue exactly as if the popup had never come up.
This code would be VERY highly appreciated. |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 246
|
Posted: Fri Jan 20, 2006 7:45 pm Post subject: |
|
|
| Quote: | | I need to have a way so that the popups can be blocked while the script lies dormant |
Is the script you refer to an ahk script, or the company software? If it is the company software that is doing the "stringing," you probably won't be able to pause it to preform your own script.
Do the popups interrupt the software's operation, or only your attempt to close the popup?
Without seeing some of you code, it will be nearly impossible to suggest how to pause any part of some script. But I will make a crude attempt, nonetheless:
| Code: |
;IfWinExist <popup name>
;Pause
;GoSub, KillThatPopup
;Continue
|
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 20, 2006 8:49 pm Post subject: |
|
|
I'm referring to my ahk script. I am using strings from variables I have set from clipboarding in excel. The popup closes just fine as it is in my settimers portion of the "persistent" code. The popups interupt my script by discontinuing the current string to close the popup.
I would need some kind of pausing mechanism that will allow my settimers to close popups, but also to allow the strings to be uninterruptible. |
|
| Back to top |
|
 |
Robert Carnegie
Joined: 01 Jun 2005 Posts: 53 Location: Scotland
|
Posted: Fri Jan 20, 2006 11:08 pm Post subject: Try command line START setting high/low priority |
|
|
Does the new feature in AHk 1.0.41.00 of directing your commands to a specific window fix this? I haven't tried it myself yet.
Another angle might be frequently to send your desired target application to the top.
If these are both too easy to actually work, have you tried setting AutoHotkey and the automated application to a higher priority than the software with the popups? The idea is that if those programs are active then they don't get interrupted by the underdog.
An application running with low priority shouldn't be affected unless regular or high priority applications are working. A high priority application is at some risk of overriding the demands of system functions, e.g. if it hangs up then you may not be able to use the keyboard to unlock the system... maybe.
START /BELOWNORMAL program.exe ...
and maybe
START /ABOVENORMAL program.exe ...
If the company application is browser-based then you could consider switching on browser-based popup-blocking for a while.
http://www.tlhouse.co.uk/PTFBPro/macrorecorderfeatures.shtml is home of a utility which hits desktop dialog boxes automatically as soon as they appear. This or another product may even be able to suppress them altogether, or lock an application in a sandbox.
That page also raises a question I haven't yet investigated with respect to AutoHotkey, the refrigerator-door question: what happens to running programs behind a locked desktop? If I press Ctrl Alt Delete and then Enter, my spreadsheet still calculates, sure. But does AutoHotkey keep running? Does the application that pops up popups? Is it perhaps possible to lock one program behind the screen and run another in front, as a screen saver - to lock out the corporate application temporarily that way?
If the popups are coming in over the network then you could temporarily disable networking - for instance turn the firewall up to 11. No more popups! I forget if Windows firewall can do that, but ZoneAlarm has a big button to stop the network!
Or, y'know, pull the plug... unless you're on wi-fi networking. Then I guess you could lock your PC in a Faraday cage, or take it in the quiet car of a train, with the phone jammer - only I guess you're not supposed to have any PCs in there either. Actually, if you're somewhere where you can legally buy jamming equipment, ......
And another off-the-wall suggestion - you could use either Terminal Services (Remote Desktop in XP) or some version of VNC or another remote-control product so that one or other of the programs you're interested in is not in fact running on your PC, it just looks like it is but it's actually inside a window. So the pop up only pops to the front of /that/ window and it doesn't interfere with anything else. Or else the AutoHotkey script is inside the window with the application and it does not care what your real desktop is doing. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Jan 21, 2006 8:38 am Post subject: |
|
|
| I've to deal with the same issue and I use a SetTimer script which runs in parallel to the Main script. Works fine. Well it keeps only WinClose commands and therefore shouldn't impact any frontend/user activety. |
|
| Back to top |
|
 |
richiverse
Joined: 28 Aug 2005 Posts: 11
|
Posted: Sat Jan 21, 2006 9:22 pm Post subject: |
|
|
| Can I see some code for this? Would it be possible to have that settimer script run as a priority and have the main script lay dormant uninterupted and continue without messing up strings? |
|
| Back to top |
|
 |
|