DynamicRookie Posted January 7, 2018 Posted January 7, 2018 Hi I am developing a script that types a string that can be specified in the Inputbox that has the $In01 variable attached. But 3 things are not working: It's not loading the gui, even when Guicreate() is specified in the code It's not typing the string, and i dont know why it doesn't type it. And last of them, It's not detecting if the script has a different name than the original, My Script is below: expandcollapse popup;Script STRNG= 103494x104955x01 #include <Misc.au3> #Include <File.au3> #include <GuiConstants.au3> #INCLUDE <GuiConstantsEx.au3> #pragma compile(inputboxres, true)" If @ScriptName Not = "DynamicRookie's Colorized No. 103494x104955x01.au3" Then MsgBox(0, "Unofficial", "You are running an unnoficial version of STRNG: 103494x104955x01 by DynamicRookie, but feel free to use it below your own risk :)") ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") EndIf $StringVal116 = 1 $Const_Win32_idGetHandle = WinGetHandle("103494x104955x01", "1x1") Sleep (10) Hotkeyset("{=}", "_ResetVariable") SetError(0, 0, 0) $In01 = InputBox("In01", "Please enter the string you want to automate :)") If @error = 4 Then Call("ConsoleErrorFunction") EndIf MsgBox(4, "In03", "Want to enable _HasToRenewVal Function? (DEFAULT: Yes)") If $IDYES = 6 Then $_HTRVal = True Elseif $IDNO = 7 Then $_HTRVal = False EndIf Global $StringVal104910 = 0 ;Default String 0x0x1 :) Global $StringVal116 = 0 ;Custom String 0x5x1 :) Global $State = 1 Global $vReStr = '000' MsgBox(0, "DynaRookie", "Script made by DynamicRookie, for 103494 in AutoIt Forums") GUICreate("103494x104955x01", 400, 400, -1, -1, -1, -1) GUICtrlCreateLabel("103494x104955x01 Active Process", 10, 10, 100, 20, -1, -1) GUICtrlCreateLabel("Value Extension Macrostring: ", 10, 40, 100, 20) $vReStr = GUICtrlCreateLabel("N/V/R", 112, 40, 50, 20) GUICtrlCreateLabel("String Specified: # " & $In01 & " #, type K to type specified string.", 0, 100, 300, 20) Call("_D4N4M11CCKR010K133") ;It waits until u press K to check for $In03 and if checked to type type $In01 in the chat, then you need to press "=" key to enable the variable back, else ;If HasToRenew function is enabled you dont need to enable it back, ;else if the variable is already enabled and you dont want to make it type $In01 when you press K, press "=" when ;the variable is already enabled, it will deactivate it until you press "=" again. Func Init0() GUICtrlSetData($vReStr, 'Initializing: Control 0x1') $StatusString = "Init0" Sleep(1) $i_Win32_idPosition = WinGetPos("103494x104955x01", "1x2") $i_Win32_Status = "Active0" GUICtrlSetData($vReStr, 'Ready to use!') $StatusString = "RD1" Call("_D4N4M11CCKR010K133") EndFunc Func _D4N4M11CCKR010K133() While 1 If _IsPressed('4B') And $StringVal116 = 1 Then $StringVal104910 = 1 ExecuteFunction_0_0_0_1() EndIf Sleep(100) WEnd EndFunc Func _ResetVariable() If $State = 0 And $_HTRVal = True Then $State = 1 Call ("_D4N4M11CCKR010K133") Elseif $State = 1 And $_HTRVal = True Then $State = 0 Call ("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf Endfunc Func ExecuteFunction_0_0_0_1() If $StatusString = "Init0" Then MsgBox(0, "Wait", "Please wait until it loads completely") Call("Init0") ElseIf $State = 1 And $_HTRVal = True Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) $State = 0 GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") ElseIf $State = 0 or $State = 1 And _HTRVal = False Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf EndFunc Func ConsoleErrorFunction() ConsoleWrite($Const_Win32_idGetHandle) MsgBox("1, 48, 256, 4096, 2097152", "Exception @error", "An Unexpected error has occurred, please contact DynamicRookie for help, in AutoIt forums ( This window will close in " & $i_idTimeout_msg & "seconds", $i_idTimeout_msg) Exit 0 If @error = 1 Then ConsoleWrite("User has decided: Cancel = Val. 2") Exit 0 ElseIf @error = 2 Then ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") ConsoleWrite("User has decided: Nothing = Val. 0") Exit 0 EndIf
farouk12 Posted January 7, 2018 Posted January 7, 2018 (edited) Maybe This expandcollapse popup;Script STRNG= 103494x104955x01 #include <Misc.au3> #Include <File.au3> #include <GuiConstants.au3> #INCLUDE <GuiConstantsEx.au3> #pragma compile(inputboxres, true) If Not (@ScriptName = "DynamicRookie's Colorized No. 103494x104955x01.au3") Then MsgBox(0, "Unofficial", "You are running an unnoficial version of STRNG: 103494x104955x01 by DynamicRookie, but feel free to use it below your own risk :)") ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") EndIf $StringVal116 = 1 $Const_Win32_idGetHandle = WinGetHandle("103494x104955x01", "1x1") Sleep (10) Hotkeyset("{=}", "_ResetVariable") SetError(0, 0, 0) $In01 = InputBox("In01", "Please enter the string you want to automate :)") If @error Then Call("ConsoleErrorFunction") EndIf $ID=MsgBox(4, "In03", "Want to enable _HasToRenewVal Function? (DEFAULT: Yes)") If $ID = 6 Then $_HTRVal = True Elseif $ID = 7 Then $_HTRVal = False EndIf Global $StringVal104910 = 0 ;Default String 0x0x1 :) Global $StringVal116 = 0 ;Custom String 0x5x1 :) Global $State = 1 Global $vReStr = '000' MsgBox(0, "DynaRookie", "Script made by DynamicRookie, for 103494 in AutoIt Forums") GUICreate("103494x104955x01", 400, 400, -1, -1, -1, -1) GUICtrlCreateLabel("103494x104955x01 Active Process", 10, 10, 100, 20, -1, -1) GUICtrlCreateLabel("Value Extension Macrostring: ", 10, 40, 100, 20) $vReStr = GUICtrlCreateLabel("N/V/R", 112, 40, 50, 20) GUICtrlCreateLabel("String Specified: # " & $In01 & " #, type K to type specified string.", 0, 100, 300, 20) GUISetState() Call("_D4N4M11CCKR010K133") ;It waits until u press K to check for $In03 and if checked to type type $In01 in the chat, then you need to press "=" key to enable the variable back, else ;If HasToRenew function is enabled you dont need to enable it back, ;else if the variable is already enabled and you dont want to make it type $In01 when you press K, press "=" when ;the variable is already enabled, it will deactivate it until you press "=" again. Func Init0() GUICtrlSetData($vReStr, 'Initializing: Control 0x1') $StatusString = "Init0" Sleep(1) $i_Win32_idPosition = WinGetPos("103494x104955x01", "1x2") $i_Win32_Status = "Active0" GUICtrlSetData($vReStr, 'Ready to use!') $StatusString = "RD1" Call("_D4N4M11CCKR010K133") EndFunc Func _D4N4M11CCKR010K133() While 1 If _IsPressed('4B') And $StringVal116 = 1 Then $StringVal104910 = 1 ExecuteFunction_0_0_0_1() EndIf Sleep(100) WEnd EndFunc Func _ResetVariable() If $State = 0 And $_HTRVal = True Then $State = 1 Call ("_D4N4M11CCKR010K133") Elseif $State = 1 And $_HTRVal = True Then $State = 0 Call ("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf Endfunc Func ExecuteFunction_0_0_0_1() #forcedef $StatusString If $StatusString = "Init0" Then MsgBox(0, "Wait", "Please wait until it loads completely") Call("Init0") ElseIf $State = 1 And $_HTRVal = True Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) $State = 0 GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") ElseIf $State = 0 or $State = 1 And $_HTRVal = False Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf EndFunc Func ConsoleErrorFunction() #forcedef $i_idTimeout_msg ConsoleWrite($Const_Win32_idGetHandle) MsgBox("1, 48, 256, 4096, 2097152", "Exception @error", "An Unexpected error has occurred, please contact DynamicRookie for help, in AutoIt forums ( This window will close in " & $i_idTimeout_msg & "seconds", $i_idTimeout_msg) Exit 0 If @error = 1 Then ConsoleWrite("User has decided: Cancel = Val. 2") Exit 0 ElseIf @error = 2 Then ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") ConsoleWrite("User has decided: Nothing = Val. 0") Exit 0 EndIf EndFunc Edited January 7, 2018 by farouk12 DynamicRookie 1
DynamicRookie Posted January 7, 2018 Author Posted January 7, 2018 16 hours ago, farouk12 said: Maybe This expandcollapse popup;Script STRNG= 103494x104955x01 #include <Misc.au3> #Include <File.au3> #include <GuiConstants.au3> #INCLUDE <GuiConstantsEx.au3> #pragma compile(inputboxres, true) If Not (@ScriptName = "DynamicRookie's Colorized No. 103494x104955x01.au3") Then MsgBox(0, "Unofficial", "You are running an unnoficial version of STRNG: 103494x104955x01 by DynamicRookie, but feel free to use it below your own risk :)") ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") EndIf $StringVal116 = 1 $Const_Win32_idGetHandle = WinGetHandle("103494x104955x01", "1x1") Sleep (10) Hotkeyset("{=}", "_ResetVariable") SetError(0, 0, 0) $In01 = InputBox("In01", "Please enter the string you want to automate :)") If @error Then Call("ConsoleErrorFunction") EndIf $ID=MsgBox(4, "In03", "Want to enable _HasToRenewVal Function? (DEFAULT: Yes)") If $ID = 6 Then $_HTRVal = True Elseif $ID = 7 Then $_HTRVal = False EndIf Global $StringVal104910 = 0 ;Default String 0x0x1 :) Global $StringVal116 = 0 ;Custom String 0x5x1 :) Global $State = 1 Global $vReStr = '000' MsgBox(0, "DynaRookie", "Script made by DynamicRookie, for 103494 in AutoIt Forums") GUICreate("103494x104955x01", 400, 400, -1, -1, -1, -1) GUICtrlCreateLabel("103494x104955x01 Active Process", 10, 10, 100, 20, -1, -1) GUICtrlCreateLabel("Value Extension Macrostring: ", 10, 40, 100, 20) $vReStr = GUICtrlCreateLabel("N/V/R", 112, 40, 50, 20) GUICtrlCreateLabel("String Specified: # " & $In01 & " #, type K to type specified string.", 0, 100, 300, 20) GUISetState() Call("_D4N4M11CCKR010K133") ;It waits until u press K to check for $In03 and if checked to type type $In01 in the chat, then you need to press "=" key to enable the variable back, else ;If HasToRenew function is enabled you dont need to enable it back, ;else if the variable is already enabled and you dont want to make it type $In01 when you press K, press "=" when ;the variable is already enabled, it will deactivate it until you press "=" again. Func Init0() GUICtrlSetData($vReStr, 'Initializing: Control 0x1') $StatusString = "Init0" Sleep(1) $i_Win32_idPosition = WinGetPos("103494x104955x01", "1x2") $i_Win32_Status = "Active0" GUICtrlSetData($vReStr, 'Ready to use!') $StatusString = "RD1" Call("_D4N4M11CCKR010K133") EndFunc Func _D4N4M11CCKR010K133() While 1 If _IsPressed('4B') And $StringVal116 = 1 Then $StringVal104910 = 1 ExecuteFunction_0_0_0_1() EndIf Sleep(100) WEnd EndFunc Func _ResetVariable() If $State = 0 And $_HTRVal = True Then $State = 1 Call ("_D4N4M11CCKR010K133") Elseif $State = 1 And $_HTRVal = True Then $State = 0 Call ("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf Endfunc Func ExecuteFunction_0_0_0_1() #forcedef $StatusString If $StatusString = "Init0" Then MsgBox(0, "Wait", "Please wait until it loads completely") Call("Init0") ElseIf $State = 1 And $_HTRVal = True Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) $State = 0 GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") ElseIf $State = 0 or $State = 1 And $_HTRVal = False Then GUICtrlSetData($vReStr, "Typing specified string") Send('' & $In01 & '', 1) GuiCtrlSetData($vReStr, "Sent function command!") Call("_D4N4M11CCKR010K133") Else Call("_D4N4M11CCKR010K133") EndIf EndFunc Func ConsoleErrorFunction() #forcedef $i_idTimeout_msg ConsoleWrite($Const_Win32_idGetHandle) MsgBox("1, 48, 256, 4096, 2097152", "Exception @error", "An Unexpected error has occurred, please contact DynamicRookie for help, in AutoIt forums ( This window will close in " & $i_idTimeout_msg & "seconds", $i_idTimeout_msg) Exit 0 If @error = 1 Then ConsoleWrite("User has decided: Cancel = Val. 2") Exit 0 ElseIf @error = 2 Then ShellExecute("https://www.autoitscript.com/forum/profile/104955-dynamicrookie/") ConsoleWrite("User has decided: Nothing = Val. 0") Exit 0 EndIf EndFunc Thanks for ur help Everything works except the main function of the script... Typing the string.. :c
careca Posted January 8, 2018 Posted January 8, 2018 When it gets to: Func _D4N4M11CCKR010K133() The variable $StringVal116 = 0 So, because you have a condition: If _IsPressed('4B') And $StringVal116 = 1 Then It's never gonna go past this and jump to ExecuteFunction_0_0_0_1 where it sends the inputbox contents. DynamicRookie 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
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