Sign in to follow this  
Followers 0
madhukar

Terminate or Stop AutoIT Script

6 posts in this topic

I am trying to terminate or stop auto IT script with ESC key when on Citirx desktop. I run my tool from my regular desktop and then the tool goes to Citrix desktop to perform some functions.

I am using

HotKeySet("{ESC}","Quit")

Func Quit()

MsgBox(0,"Stop","You have requested to abort the tool")

_ExcelBookClose($oExcel,0)

_ExcelBookClose($nExcel,0)

Exit

EndFunc

The above script works fine when I am on regular desktop but when control goes to Citrix desktop it doesn't respond to Esc Key Any help!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I don't know Citrix, but have you tried to send the ESC key manually? does it work? I'm sure you need to click on the window before sending your keys.

Check if there is a hotkey to focus that window (then you will be able to send the ESC key).

Edit : typo.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Thanks. Yeah I tried that but when the control is in Citrix desktop it doesnt work, even if I hit windows key.

Share this post


Link to post
Share on other sites

I think when you are on the Citrix desktop all your keyboard presses goes to the citrix and so the cript doesnt terminate.

You will need to minimize citrix or unfocus it and then press ESC to terminate the script.

Share this post


Link to post
Share on other sites

I think when you are on the Citrix desktop all your keyboard presses goes to the citrix and so the cript doesnt terminate.

You will need to minimize citrix or unfocus it and then press ESC to terminate the script.

That's exactly what it is, I work with virtual servers and Citrix works the same. Windows won't register keyboard presses while that's on top. You'll have to google if there's a way to not capture certain keys, such as how some virtual machines won't capture key combos such as 'ctrl-alt-del'. It may be configurable or may not. I am not super familiar with citrix.

Share this post


Link to post
Share on other sites

Anyway, he can automate the wnd switch to get out of Citrix.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0