IcantCodeHelp 0 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 Share this post Link to post Share on other sites
Melba23 3,396 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 Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted December 31, 2020 Oh still new to using this thanks Share this post Link to post Share on other sites
JockoDundee 115 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 by JockoDundee Modified my function call Code hard, but don’t hard code... Share this post Link to post Share on other sites
Nine 921 Posted January 1 Be_Kind() 1 JockoDundee reacted to this Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
JLogan3o13 1,621 Posted January 1 Wish there was an "Amen" like. 1 Draygoes reacted to this "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! Share this post Link to post Share on other sites
JockoDundee 115 Posted January 1 Ok, I'm sorry 😔 Code hard, but don’t hard code... Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted January 1 good thing it was in 2020 its 2021 now Share this post Link to post Share on other sites
JockoDundee 115 Posted January 2 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... Share this post Link to post Share on other sites
JLogan3o13 1,621 Posted January 2 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! Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted January 2 (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 by IcantCodeHelp Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted January 2 (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 by IcantCodeHelp Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted January 2 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 Share this post Link to post Share on other sites
JockoDundee 115 Posted January 2 5 hours ago, JLogan3o13 said: I don't see anything AutoHotKey in his script... HotKeySet, Freudian slip Code hard, but don’t hard code... Share this post Link to post Share on other sites
Melba23 3,396 Posted January 2 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 Share this post Link to post Share on other sites
IcantCodeHelp 0 Posted January 2 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 Share this post Link to post Share on other sites
JLogan3o13 1,621 Posted January 3 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! Share this post Link to post Share on other sites