Mantas7776 Posted August 29, 2014 Share Posted August 29, 2014 (edited) expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here local $x HotKeySet("{INS}", "xfunc") HotKeySet("{HOME}", "Terminate") ;While 1 ; Sleep(100) ;WEnd ToolTip($x) ;that part isnt working ================== Func xfunc() $x = 1 EndFunc While 1 If ($x == 1) Then Send("{ENTER}") ToolTip("working") EndIf Sleep(50) WEnd Func Terminate() Exit EndFunc Script doesnt set $x = 1 Edited code abit, deleted one while If i replace $x = 1 with tooltip, tooltip appears, I have no idea what I'm doing wrong Edited August 29, 2014 by Mantas7776 Link to comment Share on other sites More sharing options...
MikahS Posted August 29, 2014 Share Posted August 29, 2014 Multiple while loops is not good Could you post what you are trying to achieve with this script? Looks kinda like you are trying to automate a game Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Mantas7776 Posted August 29, 2014 Author Share Posted August 29, 2014 (edited) Multiple while loops is not good Could you post what you are trying to achieve with this script? Looks kinda like you are trying to automate a game I'm just trying to do simple enter spam. Deleted multiple whiles Edited August 29, 2014 by Mantas7776 Link to comment Share on other sites More sharing options...
Developers Jos Posted August 29, 2014 Developers Share Posted August 29, 2014 I'm just trying to do simple enter spam. Another Monty Python lover. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Solution MikahS Posted August 29, 2014 Solution Share Posted August 29, 2014 (edited) Again, two while loops in the main line local $x = 0 HotKeySet("{INS}", "xfunc") HotKeySet("{HOME}", "Terminate") ToolTip($x) While 1 ; only need 1 while loop If $x = 1 Then ; if x is set to 1 Send("{ENTER}") ; do this Tooltip("working") ; do this EndIf WEnd Func xfunc() $x = 1 EndIf Func Terminate() Exit EndFunc Edited August 29, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Mantas7776 Posted August 29, 2014 Author Share Posted August 29, 2014 Thank you for helping Link to comment Share on other sites More sharing options...
MikahS Posted August 29, 2014 Share Posted August 29, 2014 Anytime Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Mantas7776 Posted August 29, 2014 Author Share Posted August 29, 2014 Also any way to register hotkey clicks in-game? Because If i click macro ingame nothing happens i have to minimaze and then press macro Link to comment Share on other sites More sharing options...
Developers Jos Posted August 29, 2014 Developers Share Posted August 29, 2014 (edited) Also any way to register hotkey clicks in-game? Because If i click macro ingame nothing happens i have to minimaze and then press macro You just spoke the magic word. Read our forumrules please. *click* Edited August 29, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 29, 2014 Moderators Share Posted August 29, 2014 Mantas7776 , Because If i click macro ingame nothing happensAnd nothing more will happen here either. You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game automation - before you post again. Thread locked. 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...
Recommended Posts