satanttin Posted March 18, 2013 Share Posted March 18, 2013 (edited) Best Autoiters, I want to make a simple program so i can easily open programs like internet excel and that kind. just run into a problem when i use a shortcut to open chrome.exe it doesn't do a thing and when i close the script using the pauze button it's opening the chrome.exe which is weird O.o here is the code: HotKeySet("{PAUSE}", "StopScript") HotKeySet("{TAB}+{F1}", "google") While 1 WEnd Func StopScript() Exit EndFunc Func google() run ("chrome.exe") EndFunc hope someone can help me:) Greetz Satanttin Edited March 18, 2013 by satanttin Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 Why don't you assign a shortcut to the application itself? We use Ctrl+Alt+I (Internet Explorer), Ctrl+Alt+X (Excel) etc. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 Why don't you assign a shortcut to the application itself? We use Ctrl+Alt+I (Internet Explorer), Ctrl+Alt+X (Excel) etc.mainly because i want to learn more about autoit codes. and because it's easlier to do when you are on another computer which is alot in my case. Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 This works for me. I removed the "+" from the HotKeySet and replaced Run with ShellExecute because you have to specify thw whole path when using Run. HotKeySet("{PAUSE}", "StopScript") HotKeySet("{TAB}{F1}", "google") While 1 WEnd Func StopScript() Exit EndFunc ;==>StopScript Func google() ShellExecute("chrome.exe") EndFunc ;==>google My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 This works for me. I removed the "+" from the HotKeySet and replaced Run with ShellExecute because you have to specify thw whole path when using Run. HotKeySet("{PAUSE}", "StopScript") HotKeySet("{TAB}{F1}", "google") While 1 WEnd Func StopScript() Exit EndFunc ;==>StopScript Func google() ShellExecute("chrome.exe") EndFunc ;==>google weird still doesn't run when i press lshit+F1 and still doesn't exit on pauze and when pauze it still opens the chrome:( weird O.o but thanks for the response:) maybe it's because i need to include something or? Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 You should press TAB+F1 (that's what is coded in the HotKeySet statement). Insert Sleep(100) into your While/WEnd loop so the script doesn#t eat up all CPU cycles. Where on your keyboard is the Pause key? Maybe you need to press Shift+Pause or Alt+Pause. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 OMG O.o when i make it {TAB}+{PAUSE} it still opens a chrome when i press Tab+Pauze O.o m'kay this almost scares me:O i have no function at pauze and still does it:S i bet someone cursed me:( Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 HotKeySet("+{PAUSE}", "StopScript") HotKeySet("+{F1}", "google") this works just for the lshift though now gotta look how i do tab+"key" Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 All the key combinations you describe work fine for me. Which AutoIt version do you run? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 v3.3.8.1 isn't that a good one? Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 That's fine. I just wonder why it works here and it doesn't for you. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 yeah dunno:O kinda strange can it be that i need to include something in my script or? Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 Nothing needs to be included. It's all part of AutoIt. I'm not sure +{Tab}{F1} is a good combination. Chrome is started as soon as I press +{Tab}. I would suggest to use +{F1} only. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 Nothing needs to be included. It's all part of AutoIt.I'm not sure +{Tab}{F1} is a good combination. Chrome is started as soon as I press +{Tab}. I would suggest to use +{F1} only.when i use +{F!} it works just i want the schortcut to be TAB+F1 or is't that possible at all? Link to comment Share on other sites More sharing options...
bogQ Posted March 18, 2013 Share Posted March 18, 2013 think chrome is started as soon as tab is pressed and F1 is ignored (at least on my comp XP at the moment) due to tab isnt blocked with F1 combination as result im getting 1000 windows if you hold it 2 long TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 think chrome is started as soon as tab is pressed and F1 is ignored (at least on my comp XP at the moment)due to tab isnt blocked with F1 combination as result im getting 1000 windows if you hold it 2 longthanks i can test a few other keys in combination with the F keys and well maybe it's true TAB+F keys doesn't work. Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 (edited) Same here. I think the docu describes it here:The following hotkeys cannot be set: "any combos of two or more "base keys" such as '{F1}{F2}'" Edited March 18, 2013 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bogQ Posted March 18, 2013 Share Posted March 18, 2013 shudnt bHotKeySet("{F1}{TAB}", "google")?insteadHotKeySet("{TAB}{F1}", "google")itl fix the tab starting but for multiplye starting no sollution if you dont use ispressed in combination with your Func google() TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
satanttin Posted March 18, 2013 Author Share Posted March 18, 2013 shudnt bHotKeySet("{F1}{TAB}", "google")?insteadHotKeySet("{TAB}{F1}", "google")itl fix the tab starting but for multiplye starting no sollution if you dont use ispressed in combination with your Func google()if i do that it will open it with every tab i press xD ahwell i just use em with numpad keys:P way easier anyways:Othanks for the replys^^ and well this post can be closed because it's solved ^^ Link to comment Share on other sites More sharing options...
water Posted March 18, 2013 Share Posted March 18, 2013 To close it you can select your first post, click on "Edit" then click "Use full Editor" and change the thread title by prepending "[solved]" or something similar. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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