Excalibur Posted January 10, 2007 Share Posted January 10, 2007 I wrote a little hotkey app that does things with crtl+a ("^a") or similar are pressed. But, this programs purpose was to speed up doing things, and each time i wish to execute one of these hot keys i have to let off the crtl key do use a hot key again. (i want it fast so that i can just hold the crtl button and hit the letters to the approperate functions) So I opened notepad and put a $CrtlPressed = 0; at the top of my program and went to try and figure out if i can find out the isPressed or isDown or isActivated states of the key, just about anything giving me the know of the current state of the key. Anyhow, the end result that i want is the ability to hold down the crtl key and continue holding it to issue mutiple functions with crtl + letter combo's. Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 ...each time i wish to execute one of these hot keys i have to let off the crtl key...Are you talking about this problem: http://www.autoitscript.com/forum/index.ph...showtopic=38101 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 Yeah, that sounds like it, from my brief read I gather that no ones going to fix it and to just deal with it? Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 If you are running v3.2.2.0, then it should work without having to let up on the control or alt key. Run the code in this post: http://www.autoitscript.com/forum/index.ph...st&p=289803 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 I am running 3.2.2.0. While holding down crtl, it will not allow me to issue any new hotkey's. That test did'nt do anything on my computer, I ran it from desktop and from command prompt, and it did'nt do anything. Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 Did you run it from within SciTE so that the ConsoleWrite lines have somewhere to write to? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 (edited) >Running:(3.1.1.91):autoit3.exe "Test.au3" !s !a !d +>AutoIT3.exe ended.rc:0 well heres something i noticed... it says its running 3.1.1.91... i just reinstalled with the installer and told it to uninstall the old version. Bug report? I will attempt to remove AutoIt manually and install 3.2.2.0 again. Excuse me, I chose 'beta run'. I've only used scite to edit up until this point. >Running:(3.2.2.0):autoit3.exe Test.au3 !s !a !d +>AutoIT3.exe ended.rc:0 Edited January 10, 2007 by Excalibur Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 ...and told it to uninstall the old version. Bug report?...Could be. I uninstalled everything manually and deleted all of the old folders for this major release - so, I would not have seen that. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 (edited) well now its running this code under 3.2.2.0 as it says, and i get the same result. Here is my little program. HotKeySet("^z", "CloseTab"); while (1) Sleep(1); WEnd Func CloseTab() send("^{Tab}"); EndFunc It is to close a tab in fire fox. open FF, and try to use it, open mutiple tabs, and try to close them all using ctrl+z holding down Z the whole time. it will only do one. Its not FF, because you can hold down ctrl and press tab as many times as you want and it will close them all. Edited January 10, 2007 by Excalibur Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 What version of FF closes a tab via ctrl-tab? Anyway, change your sleep(1) to sleep(1000) or higher and add: WinActivate WinWaitActive to your func just to be sure the Send is going to the window of interest. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 (edited) Version of FF? Umm.. 1.5.0.9 ERROR: syntax error WinActivate ~~~~~~~~~~~^ I always have the sleep time much later, I set it to 1 to rule out mabey latence or something. Edited January 10, 2007 by Excalibur Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 Version of FF? Umm.. 1.5.0.9...You might want to move up to 2.0.ERROR: syntax errorWinActivate~~~~~~~~~~~^...Look in the help file for the proper syntax to use. I did not mean for you to place only that "word" into your script....I always have the sleep time much later, I set it to 1 to rule out mabey latence or something.A HotKey will interrupt a sleep. You can set it very high. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Excalibur Posted January 10, 2007 Author Share Posted January 10, 2007 (edited) Excuse me it wasnt ctrl-tab, it was crtl-f4, I was testing something. I assume you ment to insert something like this: HotKeySet("^z", "CloseTab"); while (1) Sleep(1); WEnd Func CloseTab() $CurWin = WinGetHandle (""); WinActivate ($CurWin); WinWaitActive ($CurWin); send("^{f4}"); EndFunc Which works very weirdly, it will do everything AFTER you let off the ctrl key, and works very akwardly. Edited January 10, 2007 by Excalibur Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein Link to comment Share on other sites More sharing options...
herewasplato Posted January 10, 2007 Share Posted January 10, 2007 For FF v2.0, holding down the ctrl while FF is in focus opens a little search window in the lower left of the currect browser tab. That changes the focus for my testing. I tried this: Opt("WinTitleMatchMode", 2) HotKeySet("^z", "CloseTab"); While (1) Sleep(10000) WEnd Func CloseTab() WinActivate("Mozilla Firefox") WinWaitActive("Mozilla Firefox") Send("^{F4}") EndFunc ;==>CloseTabbut still got the search window. Maybe you will need to move away form Ctrl. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now