McGod Posted July 6, 2006 Share Posted July 6, 2006 My idea is for me to hit 1 and it to add to a variable "A", 2="B" 3="C" and so on. Then for it to parse it like StringMid ( $string, 1, 1) (First character) until its read the whole thing. My problem is my Function to add the string doesnt work. Func red () Global $spot = $spot & "R" MsgBox ( 1, "Red", $spot ) playback () EndFunc When i hit 1, it records an R but then with i hit 2, its suppose to be RB but it returns B. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 6, 2006 Moderators Share Posted July 6, 2006 Care to share the rest of the functions to test? Your explination isn't very informative, and based on it, try this:Global $spot = '' red() Func red() $spot = $spot & "R" MsgBox (1, "R", $spot ) playback() MsgBox (1, "RB", $spot ) EndFunc Func playback() $spot = $spot & 'B' EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 6, 2006 Share Posted July 6, 2006 HI, I dunno exactly what you want, but does this help? HotKeySet("1", "a") HotKeySet("2", "b") Global $string = "Added : " While 1 ToolTip($string) sleep(50) WEnd Func a() $string &= 'a' EndFunc Func b() $string &= 'b' EndFunc So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 6, 2006 Moderators Share Posted July 6, 2006 Re-Read it and maybe this is what your afterGlobal $spot = '' Global $Array[10] = ['A','B','C','D','E','F','G','H','I','J'] While 1 For $i_Count = 0 To 9 If _IsPressed(30 + $i_Count) Then $spot &= $Array[$i_Count] Sleep(100) EndIf Next ToolTip($spot, 0, 0) Sleep(10) WEnd Func _IsPressed($v_R, $v_dll = 'user32.dll') $v_R = DllCall($v_dll, 'int', 'GetAsyncKeyState', 'int', '0x' & $v_R) Return (Not @error And BitAND($v_R[0], 0x8000) = 0x8000) * 1 EndFuncGL Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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