kcvinu Posted January 13, 2015 Share Posted January 13, 2015 (edited) Hi there, I have made a script to toggle my two windows. It is working. But i need the functionality of a hot key to this script. Tell me what should i do fo this Write a HotKeySet function inside my script OR Complie my script as it is and make shortcut of that exe and set a hotkey for that exe to run. Edited January 13, 2015 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
water Posted January 13, 2015 Share Posted January 13, 2015 To start the Exe I would do the latter. kcvinu 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
jvanegmond Posted January 13, 2015 Share Posted January 13, 2015 I would do the first, because I have found that if I do the latter, I usually delete the shortcut along with all the other junk on my desktop. kcvinu 1 github.com/jvanegmond Link to comment Share on other sites More sharing options...
TheSaint Posted January 13, 2015 Share Posted January 13, 2015 Personally, I've had less than satisfactory experience with Hotkeys, so I'd do neither, and would just use a Quick Launch facility or first section of the start menu ... or a floating toolbar ... perhaps accessed through the Tray. In the end, it may be down to your version of Windows. So there you have it, three recommendations ..... now which one will you choose? kcvinu 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 13, 2015 Moderators Share Posted January 13, 2015 kcvinu,I have >already told you once - post general support questions in "General Help and Support", not "Dev Chat". Please do not do it again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 13, 2015 Moderators Share Posted January 13, 2015 kcvinu,I have now merged the 2 threads you have started on this subject. Please stick to just the one from now on. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
david1337 Posted January 14, 2015 Share Posted January 14, 2015 Hi there, how to start a script itself with a hotkey ?. Post your script, and let us know which hotkey you want to use. Link to comment Share on other sites More sharing options...
Solution czardas Posted January 14, 2015 Solution Share Posted January 14, 2015 (edited) If the hotkey is created using AutoIt, clearly the script has to be running for it to work. Here's an example program which waits until the hotkey F2 is pressed. ; #include <MsgBoxConstants.au3> Global $g_Flag = False HotKeySet("{F1}", "Quit") HotKeySet("{F2}", "Resume") While 1 ; Infinite loop Sleep(20) ; Prevents the CPU from overheating If $g_Flag Then ExitLoop WEnd Func Resume() $g_Flag = True EndFunc Func Quit() Exit EndFunc ; The program starts here MsgBox($MB_OK, "Test Script", "Hello World") ; You could create a similar script to activate other programs. Look at ShellExecute() in the help file. Edited January 14, 2015 by czardas kcvinu 1 operator64 ArrayWorkshop 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