All Activity

This stream auto-updates   

  1. Past hour
  2. Hello Opertation Sys: Win7 x64 Problem: Connecting to webs using TSL 1.1 + Description: WinHttp.WinHttpRequest.5.1 using TLS 1.0 by default, i need higher version to connect into some webs. Dim $oHttp = ObjCreate("WinHTTP.WinHTTPRequest.5.1") $oHttp.open ("GET", "https://howsmyssl.com/a/check", False) $oHttp.Option(9) = 128 ; 128 - TLS 1.0, 512 - TLS 1.1, 2048 - TLS 1.2, 2560 - TLS 1.1 & TLS 1.2 $oHttp.Send ConsoleWrite($oHttp.responseText & @CRLF) ; at end of the respond you can check your TLS version. Mine is: {"tls_version":"TLS 1.0","rating":"Bad"} Error: $oHttp.Option works only with parameter 128 (TLS 1.0) other values make error {Bad parameter} Additional: I've done this tutorial about enabling TSL in registry: <link> Thanks for support. Ascer
  3. a 4 line version was also missing, here is one (... is few bytes less than the nice 3 lines version by @junkew) Global $iMsg, $j, $BA[] = [7, 8, 9, '+', 'C', 4, 5, 6, "-", "SqRt", 1, 2, 3, '*', '.', 0, '(', ')', '/', '='], $hGui = GUICreate('Calc', 360, 330, 229, 118, 0x00C00000), $D = GUICtrlCreateInput('', 8, 8, 344, 31, BitOR(0x00000080, 2)), $1 = GUISetState(@SW_SHOW), $a = DllCallbackRegister('BP', 'none', 'hwnd;uint;uint_ptr;dword'), $b = DllCall('user32.dll', 'uint_ptr', 'SetTimer', 'hwnd', 0, 'uint_ptr', 0, 'uint', 10, 'ptr', DllCallbackGetPtr($a)), $exit = MsgBox(0, "Info", "hit 'esc' or click here to exit"), $TheEnd1 = DllCallbackFree($a), $TheEnd2 = DllCall('user32.dll', 'bool', 'KillTimer', 'hwnd', 0, 'uint_ptr', $b) Func BP($hWnd, $iMsg2, $iTimerID, $iTime) ;handle the button press $j = (Assign('iMsg', GUIGetMsg(0))) * 0 ? 0 :($j < UBound($BA)) ?(GUICtrlCreateButton($BA[$j], Mod($j, 5) * 70 + 7, Int($j / 5) * 70 + 50, 65, 63) + GUICtrlSetFont(-1, 18, 400, 0, 'MS Sans Serif')) * 0 + $j + 1 : UBound($BA) + 0 * ($iMsg > 3 And $iMsg < 24 ?(GUICtrlRead($iMsg) = 'C' ? GUICtrlSetData($D, '') : GUICtrlRead($iMsg) = 'SqRt' ? GUICtrlSetData($D, Sqrt(Execute(GUICtrlRead($D)))) : GUICtrlRead($iMsg) = '=' ? GUICtrlSetData($D, Execute(GUICtrlRead($D))) :(StringInStr('0123456789()+-*/.', GUICtrlRead($iMsg))) > 0 ? GUICtrlSetData($D, GUICtrlRead($D) & GUICtrlRead($iMsg)) : 0) : 20) EndFunc ;==>BP
  4. Today
  5. Okay, I couldn't understand how I can use it in my code. I have this code: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <WindowsConstants.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #Include <AD.au3> #include <Array.au3> Opt('MustDeclareVars', 1) Global $aResult[0][2] Local $aNames[4] = ["DKSO","DKKO","SELU","SEES"] Local Const $iWidth = 300, $iHeight = 250, $iW = 85, $iH = 25 Local $hGUI = GUICreate("Find Computer Owner", $iWidth, $iHeight) ; Create a combobox control. Global $idComboBox = GUICtrlCreateCombo("", 2, 2, 296, 20, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_VSCROLL, $CBS_SORT)) ;$WS_VSCROLL Local $idMylist = GUICtrlCreateListView("", 2, 114, 295, 100) _GUICtrlListView_AddColumn($idMylist, "Computername", 296) Local $idClos = GUICtrlCreateButton("Close", ($iWidth - $iW) / 2, ($iHeight - $iH) - 7 , $iW, $iH) _AD_Open() Local $sFill = "" For $i = 0 to UBound($aNames) -1 Local $aUserInfo = _AD_GetObjectsInOU("OU=Al,DC=ad,DC=al,DC=org","(&(objectCategory=Person)(objectclass=user)(sAMAccountName=" & $aNames[$i] & "*))","","distinguishedName,cn") if @error Then MsgBox(0,@error,@extended) Exit EndIf For $x = $aUserInfo[0][0] To 1 Step -1 If $aUserInfo[$x][0] = "" Or StringInStr($aUserInfo[$x][0], "Resources") > 0 Or StringInStr($aUserInfo[$x][0], "Leavers") > 0 Or StringInStr($aUserInfo[$x][0], "Administration") > 0 Then _ArrayDelete($aUserInfo, $x) EndIf Next _ArrayConcatenate($aResult, $aUserInfo, 1) Next for $i = 0 To UBound($aResult) -1 If $aResult[$i][0] <> "" Then $sFill &= $aResult[$i][1] & "|" EndIf Next ;_ArrayDisplay($aResult, 'AD ' & UBound($aResult)) $sFill = StringTrimRight($sFill, 1) _GUICtrlComboBox_BeginUpdate($idComboBox) GUICtrlSetData($idComboBox, $sFill, "") _GUICtrlComboBox_EndUpdate($idComboBox) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClos ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) Local $iIdx = _ArraySearch($aResult,$sComboRead,0,0,0,0,1,1) Local $aComputerOwner = _AD_GetObjectsInOU("OU=al,DC=AD,DC=AL,DC=ORG","(&(objectclass=computer)(managedby=" & $aResult[$iIdx][0] & "))",Default,"cn") ; _ArrayDelete($aComputerOwner,0) ; _ArrayDisplay($aComputerOwner) _GUICtrlListView_SetItemCount($idMylist,UBound($aComputerOwner)) If IsArray($aComputerOwner) Then ; MsgBox(0,"",$sComboRead) For $i = 1 To UBound($aComputerOwner) - 1 GUICtrlCreateListViewItem($aComputerOwner[$i], $idMylist) Next Else GUICtrlSetData($idMylist, "No computer|") EndIf EndSwitch WEnd _AD_Close() ; Delete the previous GUI and all controls. GUIDelete($hGUI) Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo ; Local $tBuffer $hWndListView = $idMylist If Not IsHWnd($idMylist) Then $hWndListView = GUICtrlGetHandle($idMylist) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _Edit_Changed() _GUICtrlComboBox_AutoComplete($idComboBox) EndFunc ;==>_Edit_Changed Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo If Not IsHWnd($idComboBox) Then $hWndCombo = GUICtrlGetHandle($idComboBox) $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $idComboBox, $hWndCombo Switch $iCode Case $CBN_CLOSEUP ; Sent when the list box of a combo box has been closed _DebugPrint("$CBN_CLOSEUP" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_DBLCLK ; Sent when the user double-clicks a string in the list box of a combo box _DebugPrint("$CBN_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_DROPDOWN ; Sent when the list box of a combo box is about to be made visible _DebugPrint("$CBN_DROPDOWN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box _DebugPrint("$CBN_EDITCHANGE" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) _Edit_Changed() ; no return value Case $CBN_EDITUPDATE ; Sent when the edit control portion of a combo box is about to display altered text _DebugPrint("$CBN_EDITUPDATE" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_ERRSPACE ; Sent when a combo box cannot allocate enough memory to meet a specific request _DebugPrint("$CBN_ERRSPACE" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_KILLFOCUS ; Sent when a combo box loses the keyboard focus _DebugPrint("$CBN_KILLFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_SELCHANGE ; Sent when the user changes the current selection in the list box of a combo box _DebugPrint("$CBN_SELCHANGE" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_SELENDCANCEL ; Sent when the user selects an item, but then selects another control or closes the dialog box _DebugPrint("$CBN_SELENDCANCEL" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_SELENDOK ; Sent when the user selects a list item, or selects an item and then closes the list _DebugPrint("$CBN_SELENDOK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value Case $CBN_SETFOCUS ; Sent when a combo box receives the keyboard focus _DebugPrint("$CBN_SETFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode) ; no return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint I know you can get the value by using the mouse, but I also want to use the ENTER key, because I'm using _GUICtrlComboBox_AutoComplete, so I can just write want I'm looking for.
  6. @toto22, There's a mistake in my previous post. The bit operations only work on 32 bit integers in AutoIt (no idea why). The below code shows a method using concatenation to build the hex string instead: ; Simulate the program $t = DllStructCreate("DOUBLE") DllStructSetData($t, 1, 123.456) $p = DllStructGetPtr($t) MsgBox(0, "Address", $p) ; This is what _MemoryRead($p) does the equivalent of $tRead = DllStructCreate("DWORD", $p) $hi = DllStructGetData($tRead, 1) ; This is what _MemoryRead($p+4) does the equivalent of $tRead = DllStructCreate("DWORD", $p+4) $lo = DllStructGetData($tRead, 1) ; Combine back into an 8byte integer: $full = Hex($lo,8) & Hex($hi,8) MsgBox(0, "Read from memory", "Two dwords:" & @CRLF & Hex($hi,8) & @CRLF & Hex($lo,8) & @CRLF & $full) ; Conversion to double: $sMemHex = String($full) $nNum = Dec($sMemHex, 3) MsgBox(0, $full, $nNum) I don't have NomadMemory installed, so instead I've shown the equivalent using structs (this method only works within one process).
  7. Best done with GUISetAccelerators checkout this thread for examples: https://www.autoitscript.com/forum/topic/166085-accelerator-keys/
  8. @Valnurat Have you tried Send() key function? Basically, value was get from the combobox when sending enter key. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> _ComBox() Func _ComBox() Local $hGUI = GUICreate("ComboBox", 300, 200) Local $idComboBox = GUICtrlCreateCombo("", 10, 10, 185, 20) GUICtrlSetData($idComboBox, "Item 1|Item 2|Item 3", "") GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) If GUICtrlRead($idComboBox) = True Then Send("{ENTER}") MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) EndIf EndSwitch WEnd GUIDelete($hGUI) EndFunc
  9. Case $switchonEnter ; see one of Melba's clever scripts Case $myCombo $sValueofCombo = GuiCtrlRead($myCombo) ; ... more code
  10. How can I get combobox value by using the ENTER key?
  11. Hi @ioripalm, I use two different styles of syntax for ADO queries. Execute (does not expect a return) ; like SQLite _SQLite_Execute :) If Not _ADO_Execute($g_DB, $sSQL) = $ADO_ERR_SUCCESS Then _ ; insert, does not expect a return ConsoleWrite("0. $ADO_ERR_SUCCESS Error " & $ADO_ERR_SUCCESS & @CRLF) ConsoleWrite("0. $ADO_ERR_SUCCESS Success " & $ADO_ERR_SUCCESS & @CRLF) and where I do expect data to be returned... ; like SQLite_GetTable2d $aResult = _ADO_Execute($g_DB, $query, True, True) ; select, expect table For $a = 1 To (UBound($aResult) - 1) Step +1 $sMsg = $aResult[1][0] ; grab only the first instance (do not loop array) Next Please the SQLite documentation for differences in syntax. These examples follow a similar logic. Skysnake
  12. A small step for "X" (which works properly for files). I do not understand lines 42/70 cordially
  13. Hello Dan, Hello Dan, thank you very much, am able to complete this task successfully, below is my code. #include <IE.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Local $DLG_NOTONTOP, $DLG_MOVEABLE,$k,$c,$d,$e Local $INET_FORCERELOAD,$sURL, $sPath,$sID,$INET_DOWNLOADWAIT,$hDownload,$INET_DOWNLOADCOMPLETE,$INET_DOWNLOADBACKGROUND,$b Local $iDelete = FileDelete("C:\Print2edoc\Downloads\") ControlSend("[CLASS:Progman; TITLE:Program Manager]", "", "", "{F5}") $oExcel = _ExcelBookOpen ("C:\Print2edoc\POD.xlsx") $NumberOfRows = $oExcel.ActiveSheet.UsedRange.Rows.Count Local $sPath = "C:\Print2edoc\Downloads\" If FileExists($sPath) Then Else DirCreate($sPath) EndIf ; Display a progress bar window. ProgressOn("POD Downloads", "Progress Bar", "0 File", -1, -1, BitOR($DLG_NOTONTOP, $DLG_MOVEABLE)) ; Update the progress value of the progress bar window every second. For $a = 2 To $NumberOfRows $b = 0 WinActivate('EXCEL') $sID = _ExcelReadCell($oExcel,$a,1) Local $sURL = "http://spoton.co.in/SPOTTRACK/Advance/getpod.aspx?id=" & $sID & "&mPODDw=Y" Local $hDownload = InetGet($sURL, $sPath & $sID & ".jpg", $INET_FORCERELOAD,$INET_DOWNLOADBACKGROUND) Do Sleep(250) $b = $b + 1 Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) or $b = 10 InetClose($hDownload) $d = $NumberOfRows - 1 $c = $a - 1 $e = (100*$c/$d) ProgressSet($e,($c & "/" & $d & " " & "Files" )) Next ; Set the "subtext" and "maintext" of the progress bar window. ProgressSet(100, "Done", "100 % Complete") Sleep(5000) ProgressOff() _ExcelBookClose($oExcel)
  14. I tested it and the result was great. Thank you.
  15. @Shedunn, Here's the code with less lines (not tested). From count lines of 1000plus down to 966 lines. Well, at least some has been lessen from posted working code previously in post#4. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Run_Au3Stripper=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> #include <File.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> AutoItSetOption('MouseCoordMode' , 0) Opt("WinTitleMatchMode", 2) #Region ### START Koda GUI section ### Form=c:\users\sdunn\desktop\shelbysbp3tool.kxf Global $ShelbysBP3Tool = GUICreate("Shelby's BP3 Tool", 738, 414, -1, -1) GUISetFont(10, 800, 0, "Sitka Display") GUISetBkColor(0x6D6D6D) Global $StartBP3 = GUICtrlCreateButton("StartBP3", 223, 8, 115, 33) GUICtrlSetFont(-1, 14, 800, 0, "Sitka Display") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x3399FF) Global $SelectSirenSysOuts = GUICtrlCreateButton("SelectSirenSysOuts", 536, 176, 163, 33) GUICtrlSetColor(-1, 0x000000) Global $SirenRelayOuts = GUICtrlCreateButton("SirenRelayOuts", 536, 224, 163, 33) GUICtrlSetColor(-1, 0x000000) Global $SetNames = GUICtrlCreateButton("SetNames", 32, 304, 107, 25) GUICtrlSetColor(-1, 0x000000) Global $EXIT = GUICtrlCreateButton("EXIT", 331, 328, 75, 33) GUICtrlSetFont(-1, 14, 800, 0, "Sitka Display") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x800000) Global $InstallBP3 = GUICtrlCreateButton("InstallBP3", 391, 8, 123, 33) GUICtrlSetFont(-1, 14, 800, 0, "Sitka Display") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) Global $Group1 = GUICtrlCreateGroup("", 16, 40, 185, 113) Global $RemotePush1 = GUICtrlCreateRadio("RemotePush", 32, 80, 129, 17) GUICtrlSetState(-1, $GUI_CHECKED) Global $RemoteRotary1 = GUICtrlCreateRadio("RemoteRotary", 32, 96, 137, 17) Global $Handheld1 = GUICtrlCreateRadio("Handheld", 32, 112, 113, 17) Global $SetupCPpanel = GUICtrlCreateButton("SetupCPpanel", 24, 56, 115, 25) Global $NotUsed1 = GUICtrlCreateRadio("Not Used", 32, 128, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Group2 = GUICtrlCreateGroup("", 16, 152, 169, 145) Global $RemoteRotary2 = GUICtrlCreateRadio("RemoteRotary", 32, 208, 113, 17) Global $ConsolePush = GUICtrlCreateRadio("ConsolePush", 32, 224, 113, 17) Global $ConsoleRotary = GUICtrlCreateRadio("ConsoleRotary", 32, 240, 113, 17) GUICtrlSetState(-1, $GUI_CHECKED) Global $Handheld2 = GUICtrlCreateRadio("Handheld", 32, 256, 113, 17) Global $RemotePush2 = GUICtrlCreateRadio("RemotePush", 32, 192, 113, 17) Global $SetupSIRENpanel = GUICtrlCreateButton("SetupSIRENpanel", 24, 168, 155, 25) Global $NotUsed2 = GUICtrlCreateRadio("Not Used", 32, 272, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Group4 = GUICtrlCreateGroup("", 216, 176, 297, 121) Global $SelectLBouts = GUICtrlCreateButton("SelectLBouts", 224, 192, 107, 25) Global $LBfront = GUICtrlCreateLabel("FrontMods", 243, 247, 81, 17) Global $LBrear = GUICtrlCreateLabel("RearMods", 243, 274, 81, 17) Global $LBstt = GUICtrlCreateLabel("STT", 433, 247, 49, 17) Global $LBalleys = GUICtrlCreateLabel("Alleys", 243, 222, 65, 17) Global $LBTD = GUICtrlCreateLabel("TD", 343, 247, 57, 17) Global $LBscene = GUICtrlCreateLabel("Scene", 343, 275, 65, 17) Global $LBarrowL = GUICtrlCreateLabel("Arrow L", 343, 222, 73, 17) Global $LBarrowR = GUICtrlCreateLabel("Arrow R", 433, 222, 55, 17) Global $LBcruise = GUICtrlCreateLabel("Cruise", 433, 275, 50, 17) Global $LBCheck = GUICtrlCreateCheckbox("CheckALL", 344, 192, 89, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Group3 = GUICtrlCreateGroup("", 216, 40, 233, 137) Global $RN1outs = GUICtrlCreateLabel("RN1outs", 252, 82, 81, 17) Global $SelectRNouts = GUICtrlCreateButton("SelectRNouts", 224, 56, 107, 25) Global $RN2outs = GUICtrlCreateLabel("RN2outs", 252, 100, 81, 17) Global $RN3outs = GUICtrlCreateLabel("RN3outs", 252, 119, 89, 17) Global $RN4outs = GUICtrlCreateLabel("RN4outs", 252, 138, 89, 17) Global $RN5outs = GUICtrlCreateLabel("RN5outs", 252, 156, 89, 17) Global $RNCheck = GUICtrlCreateCheckbox("CheckALL", 344, 64, 81, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Group5 = GUICtrlCreateGroup("", 448, 40, 249, 137) Global $SelectCentralOuts = GUICtrlCreateButton("SelectCentralOuts", 456, 56, 131, 25) Global $Cgroup1 = GUICtrlCreateLabel("Group1", 479, 87, 65, 17) Global $CGroup2 = GUICtrlCreateLabel("Group2", 479, 105, 65, 17) Global $CGroup3 = GUICtrlCreateLabel("Group3", 479, 124, 65, 17) Global $CGroup4 = GUICtrlCreateLabel("Group4", 479, 143, 65, 17) Global $CentralCheck = GUICtrlCreateCheckbox("CheckALL", 600, 64, 89, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) Global $Number = 5, $iCols = 5, $iSpacing = 233 Global $CenOuts = 4, $xCols = 4, $xSpacing = 460 Global $LBouts = 3, $yCols = 3, $ySpacing = 225 Global $LBouts1 = 3, $yCols = 3, $ySpacing = 225 Global $LBouts2 = 3, $yCols = 3, $ySpacing = 225 Global $RNouts[$Number] Global $Central[$CenOuts] Global $Bout[$LBouts] Global $Bout1[$LBouts] Global $Bout2[$LBouts] For $i = 0 To $Number - 1 $RNouts[$i] = GUICtrlCreateCheckbox("", $iSpacing + (Int($i / $iCols)), ((18.7 * Mod($i, $iCols)) + 80), 15, 20) Next For $x = 0 To $CenOuts - 1 $Central[$x] = GUICtrlCreateCheckbox("", $xSpacing + (Int($x / $xCols)), ((18.7 * Mod($x, $xCols)) + 85), 15, 20) Next For $y = 0 To $LBouts - 1 $Bout[$y] = GUICtrlCreateCheckbox("", $ySpacing + (Int($y / $yCols)), ((26.7 * Mod($y, $yCols)) + 220), 15, 20) Next For $y = 0 To $LBouts1 - 1 $Bout1[$y] = GUICtrlCreateCheckbox("", $ySpacing + 100 + (Int($y / $yCols)), ((26.7 * Mod($y, $yCols)) + 220), 15, 20) Next For $y = 0 To $LBouts2 - 1 $Bout2[$y] = GUICtrlCreateCheckbox("", $ySpacing + 190 + (Int($y / $yCols)), ((26.7 * Mod($y, $yCols)) + 220), 15, 20) Next Global $PageTitle = 'bluePRINT 3 - Version 3.' Global $NameBox = 'Assign I/O' While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $EXIT Exit Case $StartBP3 _bluePRINT3() Case $InstallBP3 ;_InstallBP3internal Case $SetupCPpanel WinActivate($PageTitle) ;MouseClick('primary', 339,204, 1, 0) ;MouseClick('primary', 615,116, 1, 0) MouseClick('primary', 122,106, 1, 0) sleep( 1000) MouseClick('primary', 130, 131, 1, 0) Sleep( 1000) MouseClick('primary', 732, 182, 1, 0) If GUICtrlRead( $RemotePush1) = 1 Then Send('{UP 3}{DOWN 2}{ENTER}') EndIf If GUICtrlRead( $RemoteRotary1) = 1 Then Send('{UP 3}{DOWN 1}{ENTER}') EndIf If GUICtrlRead( $Handheld1) = 1 Then Send('{UP 3}{DOWN 3}{ENTER}') EndIf If GUICtrlRead($NotUsed1) = 1 Then Send('{UP 3}{ENTER}') EndIf Sleep( 2000) MouseClick('primary', 45, 104, 1, 0) ;Clicks I/O Mapping tab Case $SetupSIRENpanel WinActivate($PageTitle) MouseClick('primary', 122,106, 1, 0) sleep( 1000) MouseClick('primary', 130, 131, 1, 0) Sleep( 1000) MouseClick('primary', 1471, 181,1,0) If GUICtrlRead( $ConsoleRotary) = 1 Then Send('{UP 5}{DOWN 1}{ENTER}') EndIf If GUICtrlRead( $ConsolePush) = 1 Then Send('{UP 5}{DOWN 2}{ENTER}') EndIf If GUICtrlRead( $RemoteRotary2) = 1 Then Send('{UP 5}{DOWN 3}{ENTER}') EndIf If GUICtrlRead( $Handheld2) = 1 Then Send('{UP 5}{DOWN 5}{ENTER}') EndIf If GUICtrlRead($NotUsed2) = 1 Then Send('{UP 5}{ENTER}') EndIf Sleep( 2000) MouseClick('primary', 45, 104, 1, 0) Case $RNCheck For $v = 0 to $Number -1 If GUICtrlRead($RNCheck) = $GUI_UNCHECKED Then GUICtrlSetState($RNouts[$v], $GUI_UNCHECKED) Else GUICtrlSetState($RNouts[$v], $GUI_CHECKED) EndIf Next Case $RNouts[0] If GUICtrlRead($RNouts[0]) = $GUI_UNCHECKED Then GUICtrlSetState($RNCheck, $GUI_UNCHECKED) EndIf Case $RNouts[1] If GUICtrlRead($RNouts[1]) = $GUI_UNCHECKED Then GUICtrlSetState($RNCheck, $GUI_UNCHECKED) EndIf Case $RNouts[2] If GUICtrlRead($RNouts[2]) = $GUI_UNCHECKED Then GUICtrlSetState($RNCheck, $GUI_UNCHECKED) EndIf Case $RNouts[3] If GUICtrlRead($RNouts[3]) = $GUI_UNCHECKED Then GUICtrlSetState($RNCheck, $GUI_UNCHECKED) EndIf Case $RNouts[4] If GUICtrlRead($RNouts[4]) = $GUI_UNCHECKED Then GUICtrlSetState($RNCheck, $GUI_UNCHECKED) EndIf Case $SelectRNouts WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary', 874, 169, 1, 0);Needs to click on I/O Mapping and Remote Node outputs tab sleep(1000) If GUICtrlRead($RNouts[0]) = 1 Then ; This was $RN1outs MouseClick('primary', 758, 221, 1, 0);Needs to select Remote node 1 _RemoteNodeOutputs() EndIf If GUICtrlRead($RNouts[1]) = 1 Then ; This was $RN2outs MouseClick('primary', 758, 253, 1, 0);Needs to select Remote node 2 _RemoteNodeOutputs() EndIf If GUICtrlRead($RNouts[2]) = 1 Then ; This was $RN3outs MouseClick('primary', 758, 285, 1, 0);Needs to select Remote node 3 _RemoteNodeOutputs() EndIf If GUICtrlRead($RNouts[3]) = 1 Then ; This was $RN4outs MouseClick('primary', 758, 318, 1, 0);Needs to select Remote node 4 _RemoteNodeOutputs() EndIf If GUICtrlRead($RNouts[4]) = 1 Then ; This was $RN5outs MouseClick('primary', 758, 350, 1, 0);Needs to select Remote node 5 _RemoteNodeOutputs() EndIf Case $LBCheck For $v = 0 to $LBouts -1 If GUICtrlRead($LBCheck) = $GUI_UNCHECKED Then GUICtrlSetState($Bout[$v], $GUI_UNCHECKED) Else GUICtrlSetState($Bout[$v], $GUI_CHECKED) EndIf Next For $v = 0 to $LBouts1 -1 If GUICtrlRead($LBCheck) = $GUI_UNCHECKED Then GUICtrlSetState($Bout1[$v], $GUI_UNCHECKED) Else GUICtrlSetState($Bout1[$v], $GUI_CHECKED) EndIf Next For $v = 0 to $LBouts2 -1 If GUICtrlRead($LBCheck) = $GUI_UNCHECKED Then GUICtrlSetState($Bout2[$v], $GUI_UNCHECKED) Else GUICtrlSetState($Bout2[$v], $GUI_CHECKED) EndIf Next Case $Bout[0] ; this is $LBalleys If GUICtrlRead($Bout[0])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout[1] ; this is $LBFront If GUICtrlRead($Bout[1])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout[2] ; this is $LBrear If GUICtrlRead($Bout[2])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout1[0]; this is $LBarrowL If GUICtrlRead($Bout1[0])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout2[0]; this is $LBarrowR If GUICtrlRead($Bout2[0])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout1[1]; this is $LBtd If GUICtrlRead($Bout1[1])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout2[1]; this is $LBscene If GUICtrlRead($Bout2[1])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout1[2]; this is $LBstt If GUICtrlRead($Bout1[2])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $Bout2[2]; this is $LBcruise If GUICtrlRead($Bout2[2])=$GUI_UNCHECKED Then GUICtrlSetState($LBCheck, $GUI_UNCHECKED) EndIf Case $SelectLBouts WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary', 755, 169, 1,0) sleep(1000) If GUICtrlRead($Bout[0])= 1 Then ; This was $LBalleys MouseClick('primary', 789, 313, 1, 0) ;alley driver MouseClick('primary', 916, 313, 1, 0) ;alley pass ElseIf GUICtrlRead($Bout[1])= 1 Then ; This was $LBFront MouseClick('primary', 796, 431, 1, 0) ; FInb1 MouseClick('primary', 796, 461, 1, 0) ;FInb2 MouseClick('primary', 796, 491, 1, 0) ;FInb3 MouseClick('primary', 796, 520, 1, 0) ;FInb4 MouseClick('primary', 796, 550, 1, 0) ;FInb5 MouseClick('primary', 796, 230, 1, 0) ;FCorners ElseIf GUICtrlRead($Bout[2]) = 1 Then ; This was $LBrear MouseClick('primary', 922, 431, 1, 0) ; RInb1 MouseClick('primary', 922, 461, 1, 0) ;RInb2 MouseClick('primary', 922, 491, 1, 0) ;RInb3 MouseClick('primary', 922, 520, 1, 0) ;RInb4 MouseClick('primary', 922, 550, 1, 0) ;RInb5 MouseClick('primary', 796, 260, 1, 0) ;RCorners ElseIf GuiCtrlRead($Bout1[0]) = 1 Then ; This was $LBarrowL MouseClick('primary', 1054, 230, 1, 0) ElseIf GUICtrlRead($Bout2[0]) = 1 Then ; This was $LBarrowR MouseClick('primary', 1267, 230, 1, 0) ElseIf GUICtrlRead($Bout1[1]) = 1 Then ; This was $LBTD MouseClick('primary', 1058, 434, 1,0) ElseIf GUICtrlRead($Bout1[2]) = 1 Then ; This was $LBstt MouseClick('primary', 1510, 232, 1, 0) ElseIf GUICtrlRead($Bout2[1]) = 1 Then ; This was $LBscene MouseClick('primary', 1056, 463, 1, 0) ElseIf GUICtrlRead($Bout2[2]) = 1 Then ; This was $LBcruise MouseClick('primary', 1386, 353, 1, 0) EndIf ;If GUICtrlRead($LBCheck) = 1 Then ;MouseClick('primary', Case $CentralCheck For $v = 0 to $CenOuts -1 If GUICtrlRead($CentralCheck) = $GUI_UNCHECKED Then GUICtrlSetState($Central[$v], $GUI_UNCHECKED) Else GUICtrlSetState($Central[$v], $GUI_CHECKED) EndIf Next Case $Central[0]; $Cgroup1 If GUICtrlRead($Central[0]) = $GUI_UNCHECKED Then GUICtrlSetState($CentralCheck, $GUI_UNCHECKED) EndIf Case $Central[1]; $Cgroup2 If GUICtrlRead($Central[1]) = $GUI_UNCHECKED Then GUICtrlSetState($CentralCheck, $GUI_UNCHECKED) EndIf Case $Central[2]; $Cgroup3 If GUICtrlRead($Central[2]) = $GUI_UNCHECKED Then GUICtrlSetState($CentralCheck, $GUI_UNCHECKED) EndIf Case $Central[3]; $Cgroup4 If GUICtrlRead($Central[3]) = $GUI_UNCHECKED Then GUICtrlSetState($CentralCheck, $GUI_UNCHECKED) EndIf Case $SelectCentralOuts WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary', 979, 168, 1,0) sleep(1000) If GUICtrlRead($Central[0]) = 1 Then ; this was $Cgroup1 MouseClick('primary', 825, 260, 1, 0) ;#1 MouseClick('primary', 825, 295, 1, 0) ;#2 MouseClick('primary', 825, 330, 1, 0) ;#3 MouseClick('primary', 825, 364, 1, 0) ;#4 MouseClick('primary', 825, 399, 1, 0) ;#5 ElseIf GUICtrlRead($Central[1]) = 1 Then ; this was $Cgroup2 MouseClick('primary', 825, 490, 1, 0) ;#6 MouseClick('primary', 825, 524, 1, 0) ;#7 MouseClick('primary', 825, 559, 1, 0) ;#8 MouseClick('primary', 825, 595, 1, 0) ;#9 MouseClick('primary', 825, 630, 1, 0) ;#10 ElseIf GUICtrlRead($Central[2]) = 1 Then ; this was $Cgroup3 MouseClick('primary', 1299, 259, 1, 0) ;#15 MouseClick('primary', 1299, 295, 1, 0) ;#16 MouseClick('primary', 1299, 331, 1, 0) ;#17 MouseClick('primary', 1299, 365, 1, 0) ;#18 MouseClick('primary', 1299, 400, 1, 0) ;#19 ElseIf GUICtrlRead($Central[3]) = 1 Then ; this was $Cgroup4 MouseClick('primary', 1299, 490, 1, 0) ;#20 MouseClick('primary', 1299, 523, 1, 0) ;#21 MouseClick('primary', 1299, 560, 1, 0) ;#22 MouseClick('primary', 1299, 595, 1, 0) ;#23 MouseClick('primary', 1299, 630, 1, 0) ;#24 EndIf Case $SetNames WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) $NameBox = 'Assign I/O' _RN1ONames() _RN2ONames() _RN3ONames() _RN4ONames() _RN5ONames() sleep(1000) _CentralOutNames() Case $SelectSirenSysOuts WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary', 1519, 547, 1, 0) ;Siren System tab _SirenSystemFeatures _SirenSystemCP _SirenSystemSirenfeatures _SirenSystemOverride _SirenSystemArrow Case $SirenRelayOuts WinActivate($PageTitle) MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary',1843, 438, 1, 0) ;Siren Relays tab EndSwitch WEnd ;######################################### End GUI STUFF ########################################### Func _bluePRINT3() ;Run(@ScriptDir & '\bluePRINT3.exe', '', @SW_MAXIMIZE) Local $aBluePRINT3 = _FileListToArrayRec(@LocalAppDataDir & "\Apps\2.0", "bluePRINT3.exe", 1, 1, 1, 2) If @error Then Exit MsgBox(16, "bluePRINT3", "Unable to find bluePRINT3.exe files under " & @LocalAppDataDir & "\Apps\2.0") Local $aBP3Version[$aBluePRINT3[0]][2] For $i = 1 To $aBluePRINT3[0] $aBP3Version[$i-1][0] = $aBluePRINT3[$i] $aBP3Version[$i-1][1] = FileGetVersion($aBluePRINT3[$i]) Next _ArraySort($aBP3Version, 1, 0, 0, 1) Run($aBP3Version[1][0]) WinWait($PageTitle) WinActivate($PageTitle) EndFunc Func _SirenSystemFeatures() MouseClick('primary',1244, 618, 1, 0) ;Cruise MouseClick('primary',1254, 655, 1, 0) ;Cruise2 MouseClick('primary',1238, 687, 1, 0) ;LP1 MouseClick('primary',1246, 720, 1, 0) ;LP2 EndFunc Func _SirenSystemCP() MouseClick('primary',1453, 617, 1, 0) ;Rem Beep MouseClick('primary',1453, 651, 1, 0) ;Backlight MouseClick('primary',1454, 685, 1, 0) ;BL Int1 MouseClick('primary',1456, 721, 1, 0) ;BL Int2 MouseClick('primary',1453, 753, 1, 0) ;Security Trigger EndFunc Func _SirenSystemSirenfeatures() MouseClick('primary',1241, 790, 1, 0) ;Park Kill Trigger MouseClick('primary',1238, 826, 1, 0) ;Horn Ring Trigger MouseClick('primary',1243, 860, 1, 0) ;Horn Ring Enable MouseClick('primary',1241, 895, 1, 0) ;OEM horn cut EndFunc Func _SirenSystemOverride() MouseClick('primary',1457, 826, 1, 0) ;Wail MouseClick('primary',1459, 859, 1, 0) ;Yelp MouseClick('primary',1456, 893, 1, 0) ;Tone MouseClick('primary',1456, 928, 1, 0) ;Manual MouseClick('primary',1456, 962, 1, 0) ;Airhorn MouseClick('primary',1456, 995, 1, 0) ;PA MouseClick('primary',1457, 1033, 1, 0) ;RR MouseClick('primary',1455, 1063, 1, 0) ;Aux Input Tone EndFunc Func _SirenSystemArrow() MouseClick('primary',1242, 959, 1, 0) ;Left Group1 MouseClick('primary',1239, 995, 1, 0) ;Right Group 1 MouseClick('primary',1236, 1029, 1, 0) ;Left Group 2 MouseClick('primary',1242, 1062, 1, 0) ;Right Group 2 EndFunc Func _CentralOutNames() WinActivate($PageTitle) $NameBox = 'Enter Output Name' MouseClick('primary', 45, 104, 1, 0) sleep(1000) MouseClick('primary', 979, 168, 1,0) sleep(1000) MouseClick('Secondary', 825, 260, 1, 0) ;#1 WinWait($NameBox) WinActivate($NameBox) Send('COut1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 295, 1, 0) ;#2 WinWait($NameBox) WinActivate($NameBox) Send('COut2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 330, 1, 0) ;#3 WinWait($NameBox) WinActivate($NameBox) Send('COut3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 364, 1, 0) ;#4 WinWait($NameBox) WinActivate($NameBox) Send('COut4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 399, 1, 0) ;#5 WinWait($NameBox) WinActivate($NameBox) Send('COut5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 490, 1, 0) ;#6 WinWait($NameBox) WinActivate($NameBox) Send('COut6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 524, 1, 0) ;#7 WinWait($NameBox) WinActivate($NameBox) Send('COut7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 825, 559, 1, 0) ;#8 WinWait($NameBox) WinActivate($NameBox) Send('COut8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('Secondary', 825, 595, 1, 0) ;#9 WinWait($NameBox) WinActivate($NameBox) Send('COut9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('Secondary', 825, 630, 1, 0) ;#10 WinWait($NameBox) WinActivate($NameBox) Send('COut10') Send('{ENTER}') WinActivate($PageTitle) MouseClick('Secondary', 1299, 259, 1, 0) ;#15 WinWait($NameBox) WinActivate($NameBox) Send('COut15') Send('{ENTER}') WinActivate($PageTitle) MouseClick('Secondary', 1299, 295, 1, 0) ;#16 WinWait($NameBox) WinActivate($NameBox) Send('COut16') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 331, 1, 0) ;#17 WinWait($NameBox) WinActivate($NameBox) Send('COut17') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 365, 1, 0) ;#18 WinWait($NameBox) WinActivate($NameBox) Send('COut18') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 400, 1, 0) ;#19 WinWait($NameBox) WinActivate($NameBox) Send('COut19') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 490, 1, 0) ;#20 WinWait($NameBox) WinActivate($NameBox) Send('COut20') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 523, 1, 0) ;#21 WinWait($NameBox) WinActivate($NameBox) Send('COut21') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 560, 1, 0) ;#22 WinWait($NameBox) WinActivate($NameBox) Send('COut22') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 595, 1, 0) ;#23 WinWait($NameBox) WinActivate($NameBox) Send('COut23') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1299, 630, 1, 0) ;#24 WinWait($NameBox) WinActivate($NameBox) Send('COut24') Send('{ENTER}') WinActivate($PageTitle) sleep(1000) EndFunc Func _RemoteNodeOutputs() Sleep(1000) ;gives time for tab to refresh MouseClick('primary', 1126, 260, 1, 0);RN1output1 MouseClick('primary', 1123, 292, 1, 0);RN1output2 MouseClick('primary', 1120, 326, 1, 0);RN1output3 MouseClick('primary', 1121, 361, 1, 0);RN1output4 MouseClick('primary', 1121, 392, 1, 0);RN1output5 MouseClick('primary', 1121, 479, 1, 0);RN1output6 MouseClick('primary', 1121, 513, 1, 0);RN1output7 MouseClick('primary', 1121, 546, 1, 0);RN1output8 MouseClick('primary', 1121, 577, 1, 0);RN1output9 MouseClick('primary', 1121, 611, 1, 0);RN1output10 EndFunc Func _RN1ONames() MouseClick('primary', 874, 169, 1, 0);Remote Node outputs tab sleep(1000) MouseClick('primary', 758, 221, 1, 0) ;Rnode1 MouseClick('secondary', 1126, 260, 1, 0);RN1output1 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1123, 292, 1, 0);RN1output2 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1120, 326, 1, 0);RN1output3 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 361, 1, 0);RN1output4 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 392, 1, 0);RN1output5 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 479, 1, 0);RN1output6 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 513, 1, 0);RN1output7 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 546, 1, 0);RN1output8 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 577, 1, 0);RN1output9 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 611, 1, 0);RN1output10 WinWait($NameBox) WinActivate($NameBox) Send('RN1Out10') Send('{ENTER}') WinActivate($PageTitle) EndFunc Func _RN2ONames() MouseClick('primary', 874, 169, 1, 0);Remote Node outputs tab sleep(1000) MouseClick('primary', 758, 253, 1, 0) ;Rnode2 MouseClick('secondary', 1126, 260, 1, 0);RN1output1 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1123, 292, 1, 0);RN1output2 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1120, 326, 1, 0);RN1output3 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 361, 1, 0);RN1output4 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 392, 1, 0);RN1output5 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 479, 1, 0);RN1output6 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 513, 1, 0);RN1output7 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 546, 1, 0);RN1output8 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 577, 1, 0);RN1output9 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 611, 1, 0);RN1output10 WinWait($NameBox) WinActivate($NameBox) Send('RN2Out10') Send('{ENTER}') WinActivate($PageTitle) EndFunc Func _RN3ONames() MouseClick('primary', 874, 169, 1, 0);Remote Node outputs tab sleep(1000) MouseClick('primary', 758, 285, 1, 0) ;Rnode3 MouseClick('secondary', 1126, 260, 1, 0);RN1output1 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1123, 292, 1, 0);RN1output2 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1120, 326, 1, 0);RN1output3 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 361, 1, 0);RN1output4 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 392, 1, 0);RN1output5 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 479, 1, 0);RN1output6 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 513, 1, 0);RN1output7 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 546, 1, 0);RN1output8 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 577, 1, 0);RN1output9 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 611, 1, 0);RN1output10 WinWait($NameBox) WinActivate($NameBox) Send('RN3Out10') Send('{ENTER}') WinActivate($PageTitle) EndFunc Func _RN4ONames() MouseClick('primary', 874, 169, 1, 0);Remote Node outputs tab sleep(1000) MouseClick('primary', 758, 318, 1, 0) ;Rnode4 MouseClick('secondary', 1126, 260, 1, 0);RN1output1 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1123, 292, 1, 0);RN1output2 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1120, 326, 1, 0);RN1output3 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 361, 1, 0);RN1output4 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 392, 1, 0);RN1output5 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 479, 1, 0);RN1output6 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 513, 1, 0);RN1output7 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 546, 1, 0);RN1output8 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 577, 1, 0);RN1output9 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 611, 1, 0);RN1output10 WinWait($NameBox) WinActivate($NameBox) Send('RN4Out10') Send('{ENTER}') WinActivate($PageTitle) EndFunc Func _RN5ONames() MouseClick('primary', 874, 169, 1, 0);Remote Node outputs tab sleep(1000) MouseClick('primary', 758, 350, 1, 0) ;Rnode5 MouseClick('secondary', 1126, 260, 1, 0);RN1output1 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out1') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1123, 292, 1, 0);RN1output2 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out2') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1120, 326, 1, 0);RN1output3 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out3') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 361, 1, 0);RN1output4 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out4') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 392, 1, 0);RN1output5 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out5') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 479, 1, 0);RN1output6 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out6') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 513, 1, 0);RN1output7 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out7') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 546, 1, 0);RN1output8 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out8') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 577, 1, 0);RN1output9 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out9') Send('{ENTER}') WinActivate($PageTitle) MouseClick('secondary', 1121, 611, 1, 0);RN1output10 WinWait($NameBox) WinActivate($NameBox) Send('RN5Out10') Send('{ENTER}') WinActivate($PageTitle) EndFunc
  16. well...first you would need to get the PID and handle of the program you're trying to edit... which should look something like this... $pid = run("C:\LOCATION") Func HWndProc($iPid, $iOption = 1, $sTitle = "", $iTimeout = 2000) Local $aReturn[1][1] = [[0]], $aWin, $hTimer = TimerInit() While 1 $aWin = WinList($sTitle) For $i = 1 To $aWin[0][0] If $iPid = WinGetProcess($aWin[$i][1]) Then If $iOption = 1 OR ($iOption = 0 And $aWin[$i][0] <> "") Then Return $aWin[$i][1] ElseIf $iOption = 2 Then ReDim $aReturn[UBound($aReturn) + 1][2] $aReturn[0][0] += 1 $aReturn[$aReturn[0][0]][0] = $aWin[$i][0] $aReturn[$aReturn[0][0]][1] = $aWin[$i][1] EndIf EndIf Next If $iOption = 2 And $aReturn[0][0] > 0 Then Return $aReturn If TimerDiff($hTimer) > $iTimeout Then ExitLoop Sleep(Opt("WinWaitDelay")) WEnd EndFunc then you'd need to search that program's memory somehow, and show the addresses of data that matches for your integers
  17. Hello. Use str instead char* Saludos
  18. I'm trying to call the NSS_Init() function in nss3.dll. The DllCall either fails or crashes AutoIt (rc:-1073741819) and I can't figure out what I'm doing wrong. Does anyone see the problem? #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 _Test() Func _Test() Local $h_Glue = DllOpen(@ProgramFilesDir & "\Mozilla Firefox\mozglue.dll") Local $h_NSS = DllOpen(@ProgramFilesDir & "\Mozilla Firefox\nss3.dll") Local $a_Ret = DllCall($h_NSS, "str", "NSS_GetVersion") If @error Then Return SetError(1, 0, "") ConsoleWrite($a_Ret[0] & @CRLF) ; 3.15.5 Basic ECC $a_Ret = DllCall($h_NSS, "int", "NSS_Init", "char*", "C:\Documents and Settings\TigBits\Application Data\Mozilla\Firefox\Profiles\tigbits.default") ; @error = 1 ;~ $a_Ret = DllCall($h_NSS, "int", "NSS_Init", "str", "C:\Documents and Settings\TigBits\Application Data\Mozilla\Firefox\Profiles\tigbits.default") ; hard crash ;~ Local $t_CHAR = DllStructCreate("CHAR[300];") ;~ DllStructSetData($t_CHAR, 1, "C:\Documents and Settings\TigBits\Application Data\Mozilla\Firefox\Profiles\tigbits.default") ;~ $a_Ret = DllCall($h_NSS, "int", "NSS_Init", "ptr", DllStructGetPtr($t_CHAR)) ; hard crash $a_Ret = DllCall($h_NSS, "bool", "NSS_IsInitialized") If @error Then Return SetError(2, 0, "") ConsoleWrite($a_Ret[0] & @CRLF) ; 0 because NSS_Init failed DllClose($h_Glue) DllClose($h_NSS) EndFunc #cs extern SECStatus NSS_Init(const char *configdir); configdir: A pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside. typedef enum { SECWouldBlock = -2, SECFailure = -1, SECSuccess = 0 } SECStatus; #ce
  19. @Au3Builder But I dont want to hide the controls window. If change to 'invisible', it hides all
  20. Yesterday
  21. Had you thought about it, or searched the forum, you would have found the answer to both questions - discussed multiple times. Will it? If Jon deems it worth adding. When? When Jon deems it worth adding. Locking this thread as it has been discussed ad nauseam.
  22. Map feature would be really a nice thing in AutoIt as seen in the 3.3.15.0 beta version. Will this functionality be taken up in a stable future release ? I do not ask when. I know the response ;-).
  23. Out of curiosity no real issue to fix. Can I do recursion with the ?: operators? in combination with eval, assign, execute functions Example 3 breaks whereas 1 and 2 are fine Global $j=3 ;~ Example 1 Global $trick="$j<10 ? 4 : 5" Global $j=execute($trick) consolewrite($j & @crlf) ;~ Example 2 Global $a="$j+2" Global $trick="eval(""j"")<10 ? execute(eval(""a"")) : (execute(eval(""a"")) * 5)" $j=execute($trick) consolewrite($j & @crlf) consolewrite($trick & @crlf) ;~ Example 3 Global $a="$j+2" Global $trick="eval(""j"")<10 ? (execute(eval(""a"")) + (execute(eval(""trick""))*0) ) : (execute(eval(""a"")) * 5)" $j=execute($trick) consolewrite($j & @crlf) ;~ consolewrite($x & @crlf) consolewrite($trick & @crlf) Exit Wondering if you can do something like this (pseudocode) $trick="($j=<10) ? $j=j+1 + (consolewrite($j) & @CRLF ) + execute($trick) : (consolewrite("end" & @CRLF)) I can imagine then I have to use more functions like assign, execute, eval etc. $trick="($j=<10) ? assign(""j"",execute(""j+1"")) + (consolewrite($j) & @CRLF ) + execute($trick) : (consolewrite("end" & @CRLF))
  24. Hello, Community. My goal is to create a script that will repeatedly hit the "scan" button in thinkorwim scanner (in case anyone's familiar with it). I will work on looping it later, because now it just doesn't work. The cursor is moving, the window becomes activated, but no clicks come through. I can't use ControlClick because I can't get control ID or anything from this button. If you have any advice at all, please do share - maybe it can be done via entirely different approach. Screenshot attached. $pos=MouseGetPos() MouseClick("left",690,310,1,0) MouseMove($pos[0],$pos[1],0) WinActivate ( "Stock Hacker Main@thinkorswim [build 1922]" )
  25. "And they say I'm just a grumpy old man..... " If so then you are a very kind old man Thank you for this, it makes so much more sense now if i read the construct of the code TBH i understand this forum has his own rules, because many guys ask questions like i did and also many guys ask questions before reading the forum rules and get punished more or less for this. I tried to learn about AutoIT but for someone who is not familiar with programming it is hard. With your help and look into your changes it was like turning a litght on Many thanks for this!
  26. @NguyenLe Try making the following change to _WD_WaitElement -- If $iErr Then SetError(__WD_Error($sFuncName, $iErr)) EndIf Basically, by adding the If...EndIf, it stops __WD_Error for being called unless an error was previously detected.
  27. Good catch, Miliardsto. I was aware of some issues in the latest AutoIt version, but not having upgraded yet myself, I was unaware that some of these might affect CodeScanner's proper functioning. Let's hope the devs get on top of it soon. Glad you found a way forward regardless though.
  1. Load more activity