Thatsgreat2345 Posted November 26, 2005 Share Posted November 26, 2005 i was wondering if theres anyway to send a variable i tryed but it wasnt workign like you insert a certain key in a GUI and u have send("{$input_1}") or what? expandcollapse popup#region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 190, 330,(@DesktopWidth-190)/2, (@DesktopHeight-330)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("", 50, 50, 70, 20) $Input_2 = GuiCtrlCreateInput("", 50, 120, 70, 20) $Input_3 = GuiCtrlCreateInput("", 50, 190, 70, 20) $Label_4 = GuiCtrlCreateLabel("Skill Button", 30, 20, 120, 20) $Label_5 = GuiCtrlCreateLabel("Pot Button", 30, 90, 110, 20) $Label_6 = GuiCtrlCreateLabel("Number of Casts", 30, 160, 120, 20) $Input_4 = GuiCtrlCreateInput("", 30, 280, 70, 20) $Label_8 = GuiCtrlCreateLabel("Number Of Pots To Cast", 40, 260, 100, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{f1}", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() $skill = $Input_1 while 1 for $i = 1 to $Input_3 send("{$skill}") sleep(1000) Next for $h = 1 to $Input_4 send("{Input_3}") next wend Endfunc Link to comment Share on other sites More sharing options...
GaryFrost Posted November 26, 2005 Share Posted November 26, 2005 example send("{" & $skill & "}") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 26, 2005 Share Posted November 26, 2005 Below is what I think will help. Let me know after you test it. I am not positive because of how your question is worded. Send($Input_3) Let me know how it works, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 26, 2005 Author Share Posted November 26, 2005 neither of them seem to be working :-/ Link to comment Share on other sites More sharing options...
Developers Jos Posted November 26, 2005 Developers Share Posted November 26, 2005 neither of them seem to be working :-/ To read the value from the GUI you need to do GUIRead($Input_3).. 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...
JSThePatriot Posted November 27, 2005 Share Posted November 27, 2005 What ^^^ he said. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 27, 2005 Author Share Posted November 27, 2005 like this cuz it aint working and with the send i cant figure out how to encorporate it in with the send cuz on an old script i used it was like Send(GuiCtrlRead($Input_3) & "{Enter}"); but i cant figure out how to take off the enter and yeah expandcollapse popup#region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 190, 330,(@DesktopWidth-190)/2, (@DesktopHeight-330)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("", 50, 50, 70, 20) $Input_2 = GuiCtrlCreateInput("", 50, 120, 70, 20) $Input_3 = GuiCtrlCreateInput("", 50, 190, 70, 20) $Label_4 = GuiCtrlCreateLabel("Skill Button", 30, 20, 120, 20) $Label_5 = GuiCtrlCreateLabel("Pot Button", 30, 90, 110, 20) $Label_6 = GuiCtrlCreateLabel("Number of Casts", 30, 160, 120, 20) $Input_4 = GuiCtrlCreateInput("", 30, 280, 70, 20) $Label_8 = GuiCtrlCreateLabel("Number Of Pots To Cast", 40, 260, 100, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{f7}", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() while 1 for $i = 1 to GUICtrlRead($Input_3) send("{" & $Input_1 & "}") sleep(1000) Next for $h = 1 to GUICtrlRead($Input_4) send("{" & $Input_2 & "}") Next WEnd Endfunc Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 27, 2005 Share Posted November 27, 2005 Try this... expandcollapse popup#region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 190, 330,(@DesktopWidth-190)/2, (@DesktopHeight-330)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("", 50, 50, 70, 20) $Input_2 = GuiCtrlCreateInput("", 50, 120, 70, 20) $Input_3 = GuiCtrlCreateInput("", 50, 190, 70, 20) $Label_4 = GuiCtrlCreateLabel("Skill Button", 30, 20, 120, 20) $Label_5 = GuiCtrlCreateLabel("Pot Button", 30, 90, 110, 20) $Label_6 = GuiCtrlCreateLabel("Number of Casts", 30, 160, 120, 20) $Input_4 = GuiCtrlCreateInput("", 30, 280, 70, 20) $Label_8 = GuiCtrlCreateLabel("Number Of Pots To Cast", 40, 260, 100, 20) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{f7}", "ShowMessage");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() While 1 For $i = 1 to GUICtrlRead($Input_3) Send(GUICtrlRead($Input_1)) Sleep(1000) Next For $h = 1 to GUICtrlRead($Input_4) Send(GUICtrlRead($Input_2) Next WEnd Endfunc You put the GUICtrlRead in most of the right places. . Now if the input from $Input_1or2 is a key and not a string then you will need the "{" & "}" stuff. I took it out as it seems it would be unnecessary. I hope this helps you more in the right direction. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) 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