IcantCodeHelp Posted December 31, 2020 Share Posted December 31, 2020 (edited) Here's my first actual script I made my next step is making it into a GUI Global $start HotKeySet("{ESC}", "Start_Up") HotKeySet("{1}", "Stop_Now") While 1 if $start==True Then Send("Start and Stop works") Sleep(1000) EndIf ToolTip("") Sleep ("") WEnd Func Start_Up() $start = True ;Return $start EndFunc Func Stop_Now() $start = False EndFunc Its really simple hopefully it helps on lookers Edited December 31, 2020 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 31, 2020 Moderators Share Posted December 31, 2020 IcantCodeHelp, When you post code in future please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation. 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...
IcantCodeHelp Posted December 31, 2020 Author Share Posted December 31, 2020 Oh still new to using this thanks Link to comment Share on other sites More sharing options...
JockoDundee Posted December 31, 2020 Share Posted December 31, 2020 (edited) 22 hours ago, IcantCodeHelp said: Here's my first actual script I made my next step is making it into a GUI Global $start HotKeySet("{ESC}", "Start_Up") HotKeySet("{1}", "Stop_Now") While 1 if $start==True Then Send("Start and Stop works") Sleep(1000) EndIf ToolTip("") Sleep ("") WEnd Func Start_Up() $start = True ;Return $start EndFunc Func Stop_Now() $start = False EndFunc Its really simple hopefully it helps on lookers Start_Up() Edited January 1, 2021 by JockoDundee Modified my function call Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Nine Posted January 1, 2021 Share Posted January 1, 2021 Be_Kind() JockoDundee 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 1, 2021 Moderators Share Posted January 1, 2021 Wish there was an "Amen" like. Draygoes 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
JockoDundee Posted January 1, 2021 Share Posted January 1, 2021 Ok, I'm sorry 😔 Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
IcantCodeHelp Posted January 1, 2021 Author Share Posted January 1, 2021 good thing it was in 2020 its 2021 now Link to comment Share on other sites More sharing options...
JockoDundee Posted January 2, 2021 Share Posted January 2, 2021 16 hours ago, IcantCodeHelp said:good thing it was in 2020 its 2021 now Maybe I can make it up to you. Since your being gracious enough to put your code out there for others, let me help as well by pointing out a few things about the code you posted. Global $start HotKeySet("{ESC}", "Start_Up") HotKeySet("{1}", "Stop_Now") While 1 if $start==True Then ; == is useful when comparing strings with mixed case, in this case = works fine ; or just If $start Then Send("Start and Stop works") ; Send where? - this could be dangerous Sleep(1000) ; also be careful when using Send at the same time as Hotkeyset ; strange interactions can occur EndIf ToolTip("") ; Doesn't do anything here Sleep ("") ; "" evaluates to 0, so also not useful - if this was meant to slow down the loop it ; wont work use an integer with a nominal magnitude WEnd Func Start_Up() $start = True ;Return $start EndFunc Func Stop_Now() $start = False EndFunc Regarding the Send and Autohotkey interaction, see what happens if you change your message to “Start and Stop works 1 time”. G’day Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 2, 2021 Moderators Share Posted January 2, 2021 I don't see anything AutoHotKey in his script... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
IcantCodeHelp Posted January 2, 2021 Author Share Posted January 2, 2021 (edited) 7 minutes ago, JLogan3o13 said: I don't see anything AutoHotKey in his script... I've figured everything out through literally trail and error I'm working on an updated script Edited January 2, 2021 by IcantCodeHelp Link to comment Share on other sites More sharing options...
IcantCodeHelp Posted January 2, 2021 Author Share Posted January 2, 2021 (edited) 2 hours ago, JockoDundee said: Maybe I can make it up to you. Since your being gracious enough to put your code out there for others, let me help as well by pointing out a few things about the code you posted. Global $start HotKeySet("{ESC}", "Start_Up") HotKeySet("{1}", "Stop_Now") While 1 if $start==True Then ; == is useful when comparing strings with mixed case, in this case = works fine ; or just If $start Then Send("Start and Stop works") ; Send where? - this could be dangerous Sleep(1000) ; also be careful when using Send at the same time as Hotkeyset ; strange interactions can occur EndIf ToolTip("") ; Doesn't do anything here Sleep ("") ; "" evaluates to 0, so also not useful - if this was meant to slow down the loop it ; wont work use an integer with a nominal magnitude WEnd Func Start_Up() $start = True ;Return $start EndFunc Func Stop_Now() $start = False EndFunc Regarding the Send and Autohotkey interaction, see what happens if you change your message to “Start and Stop works 1 time”. G’day Thank I took note to this and im working on another now and == is from another language i was learning Edited January 2, 2021 by IcantCodeHelp Link to comment Share on other sites More sharing options...
IcantCodeHelp Posted January 2, 2021 Author Share Posted January 2, 2021 Through trial and error and reading the scripts presented to me I've made a new simple script Global $TheText = InputBox("Hi its me", "Paste sleep time below", "") While 1 ToolTip("You Can change my sleep time through input") Sleep($TheText) WEnd For any on lookers or anyone new to programming my issue was not slowing down take your time Link to comment Share on other sites More sharing options...
JockoDundee Posted January 2, 2021 Share Posted January 2, 2021 5 hours ago, JLogan3o13 said: I don't see anything AutoHotKey in his script... HotKeySet, Freudian slip Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 2, 2021 Moderators Share Posted January 2, 2021 IcantCodeHelp, I have moved your post 2 above from Chat and merged it with this thread as Chat is NOT for AutoIt coding threads. I suggest that from now on you keep all your code snippets in this thread - if you post them elsewhere they are likely to disappear. 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...
IcantCodeHelp Posted January 2, 2021 Author Share Posted January 2, 2021 9 hours ago, Melba23 said: IcantCodeHelp, I have moved your post 2 above from Chat and merged it with this thread as Chat is NOT for AutoIt coding threads. I suggest that from now on you keep all your code snippets in this thread - if you post them elsewhere they are likely to disappear. M23 Oh ok didnt understand it Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 3, 2021 Moderators Share Posted January 3, 2021 6 hours ago, IcantCodeHelp said: Oh ok didnt understand it That seems to be a real issue with you. I believe you have been spoken to by everyone on the Mod staff now; not sure how we can explain things any more simply to you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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