Leaderboard
Popular Content
Showing content with the highest reputation on 02/19/2018 in all areas
-
Sure. It is just a matter of running the result of IniRead() through the Func Convert_Variables(). Till now that is only done for Directives, but easy enough to implement for INI defaults. I've updated it for the below fields in the INI in the current available beta of AutoIt3Wrapper: 17.224.935.11 allow for variables (e.g. %date%) in Comment/Description/FieldValue1/FieldValue2 Jos2 points
-
Hello, I just made an UDF for Encoding/Decoding the string and HTML Entity Number. HTML.au3: #include-once #include <Array.au3> Dim $Entity[65536] $Entity[34] = "quot" $Entity[38] = "amp" $Entity[39] = "apos" $Entity[60] = "lt" $Entity[62] = "gt" $Entity[160] = "nbsp" $Entity[161] = "iexcl" $Entity[162] = "cent" $Entity[163] = "pound" $Entity[164] = "curren" $Entity[165] = "yen" $Entity[166] = "brvbar" $Entity[167] = "sect" $Entity[168] = "uml" $Entity[169] = "copy" $Entity[170] = "ordf" $Entity[171] = "laquo" $Entity[172] = "not" $Entity[173] = "shy" $Entity[174] = "reg" $Entity[175] = "macr" $Entity[176] = "deg" $Entity[177] = "plusmn" $Entity[178] = "sup2" $Entity[179] = "sup3" $Entity[180] = "acute" $Entity[181] = "micro" $Entity[182] = "para" $Entity[183] = "middot" $Entity[184] = "cedil" $Entity[185] = "sup1" $Entity[186] = "ordm" $Entity[187] = "raquo" $Entity[188] = "frac14" $Entity[189] = "frac12" $Entity[190] = "frac34" $Entity[191] = "iquest" $Entity[192] = "Agrave" $Entity[193] = "Aacute" $Entity[194] = "Acirc" $Entity[195] = "Atilde" $Entity[196] = "Auml" $Entity[197] = "Aring" $Entity[198] = "AElig" $Entity[199] = "Ccedil" $Entity[200] = "Egrave" $Entity[201] = "Eacute" $Entity[202] = "Ecirc" $Entity[203] = "Euml" $Entity[204] = "Igrave" $Entity[205] = "Iacute" $Entity[206] = "Icirc" $Entity[207] = "Iuml" $Entity[208] = "ETH" $Entity[209] = "Ntilde" $Entity[210] = "Ograve" $Entity[211] = "Oacute" $Entity[212] = "Ocirc" $Entity[213] = "Otilde" $Entity[214] = "Ouml" $Entity[215] = "times" $Entity[216] = "Oslash" $Entity[217] = "Ugrave" $Entity[218] = "Uacute" $Entity[219] = "Ucirc" $Entity[220] = "Uuml" $Entity[221] = "Yacute" $Entity[222] = "THORN" $Entity[223] = "szlig" $Entity[224] = "agrave" $Entity[225] = "aacute" $Entity[226] = "acirc" $Entity[227] = "atilde" $Entity[228] = "auml" $Entity[229] = "aring" $Entity[230] = "aelig" $Entity[231] = "ccedil" $Entity[232] = "egrave" $Entity[233] = "eacute" $Entity[234] = "ecirc" $Entity[235] = "euml" $Entity[236] = "igrave" $Entity[237] = "iacute" $Entity[238] = "icirc" $Entity[239] = "iuml" $Entity[240] = "eth" $Entity[241] = "ntilde" $Entity[242] = "ograve" $Entity[243] = "oacute" $Entity[244] = "ocirc" $Entity[245] = "otilde" $Entity[246] = "ouml" $Entity[247] = "divide" $Entity[248] = "oslash" $Entity[249] = "ugrave" $Entity[250] = "uacute" $Entity[251] = "ucirc" $Entity[252] = "uuml" $Entity[253] = "yacute" $Entity[254] = "thorn" $Entity[255] = "yuml" $Entity[338] = "OElig" $Entity[339] = "oelig" $Entity[352] = "Scaron" $Entity[353] = "scaron" $Entity[376] = "Yuml" $Entity[402] = "fnof" $Entity[710] = "circ" $Entity[732] = "tilde" $Entity[913] = "Alpha" $Entity[914] = "Beta" $Entity[915] = "Gamma" $Entity[916] = "Delta" $Entity[917] = "Epsilon" $Entity[918] = "Zeta" $Entity[919] = "Eta" $Entity[920] = "Theta" $Entity[921] = "Iota" $Entity[922] = "Kappa" $Entity[923] = "Lambda" $Entity[924] = "Mu" $Entity[925] = "Nu" $Entity[926] = "Xi" $Entity[927] = "Omicron" $Entity[928] = "Pi" $Entity[929] = "Rho" $Entity[931] = "Sigma" $Entity[932] = "Tau" $Entity[933] = "Upsilon" $Entity[934] = "Phi" $Entity[935] = "Chi" $Entity[936] = "Psi" $Entity[937] = "Omega" $Entity[945] = "alpha" $Entity[946] = "beta" $Entity[947] = "gamma" $Entity[948] = "delta" $Entity[949] = "epsilon" $Entity[950] = "zeta" $Entity[951] = "eta" $Entity[952] = "theta" $Entity[953] = "iota" $Entity[954] = "kappa" $Entity[955] = "lambda" $Entity[956] = "mu" $Entity[957] = "nu" $Entity[958] = "xi" $Entity[959] = "omicron" $Entity[960] = "pi" $Entity[961] = "rho" $Entity[962] = "sigmaf" $Entity[963] = "sigma" $Entity[964] = "tau" $Entity[965] = "upsilon" $Entity[966] = "phi" $Entity[967] = "chi" $Entity[968] = "psi" $Entity[969] = "omega" $Entity[977] = "thetasym" $Entity[978] = "upsih" $Entity[982] = "piv" $Entity[8194] = "ensp" $Entity[8195] = "emsp" $Entity[8201] = "thinsp" $Entity[8204] = "zwnj" $Entity[8205] = "zwj" $Entity[8206] = "lrm" $Entity[8207] = "rlm" $Entity[8211] = "ndash" $Entity[8212] = "mdash" $Entity[8216] = "lsquo" $Entity[8217] = "rsquo" $Entity[8218] = "sbquo" $Entity[8220] = "ldquo" $Entity[8221] = "rdquo" $Entity[8222] = "bdquo" $Entity[8224] = "dagger" $Entity[8225] = "Dagger" $Entity[8226] = "bull" $Entity[8230] = "hellip" $Entity[8240] = "permil" $Entity[8242] = "prime" $Entity[8243] = "Prime" $Entity[8249] = "lsaquo" $Entity[8250] = "rsaquo" $Entity[8254] = "oline" $Entity[8260] = "frasl" $Entity[8364] = "euro" $Entity[8465] = "image" $Entity[8472] = "weierp" $Entity[8476] = "real" $Entity[8482] = "trade" $Entity[8501] = "alefsym" $Entity[8592] = "larr" $Entity[8593] = "uarr" $Entity[8594] = "rarr" $Entity[8595] = "darr" $Entity[8596] = "harr" $Entity[8629] = "crarr" $Entity[8656] = "lArr" $Entity[8657] = "uArr" $Entity[8658] = "rArr" $Entity[8659] = "dArr" $Entity[8660] = "hArr" $Entity[8704] = "forall" $Entity[8706] = "part" $Entity[8707] = "exist" $Entity[8709] = "empty" $Entity[8711] = "nabla" $Entity[8712] = "isin" $Entity[8713] = "notin" $Entity[8715] = "ni" $Entity[8719] = "prod" $Entity[8721] = "sum" $Entity[8722] = "minus" $Entity[8727] = "lowast" $Entity[8730] = "radic" $Entity[8733] = "prop" $Entity[8734] = "infin" $Entity[8736] = "ang" $Entity[8743] = "and" $Entity[8744] = "or" $Entity[8745] = "cap" $Entity[8746] = "cup" $Entity[8747] = "int" $Entity[8756] = "there4" $Entity[8764] = "sim" $Entity[8773] = "cong" $Entity[8776] = "asymp" $Entity[8800] = "ne" $Entity[8801] = "equiv" $Entity[8804] = "le" $Entity[8805] = "ge" $Entity[8834] = "sub" $Entity[8835] = "sup" $Entity[8836] = "nsub" $Entity[8838] = "sube" $Entity[8839] = "supe" $Entity[8853] = "oplus" $Entity[8855] = "otimes" $Entity[8869] = "perp" $Entity[8901] = "sdot" $Entity[8968] = "lceil" $Entity[8969] = "rceil" $Entity[8970] = "lfloor" $Entity[8971] = "rfloor" $Entity[9001] = "lang" $Entity[9002] = "rang" $Entity[9674] = "loz" $Entity[9824] = "spades" $Entity[9827] = "clubs" $Entity[9829] = "hearts" $Entity[9830] = "diams" ;=============================================================================== ; ; Function Name: _HTMLEncode() ; Description: Encode the normal string into HTML Entity Number ; Parameter(s): $String - The string you want to encode. ; ; Requirement(s): AutoIt v3.2.4.9 or higher (Unicode) ; Return Value(s): On Success - Returns HTML Entity Number ; On Failure - Nothing ; ; Author(s): Dhilip89 ; ;=============================================================================== Func _HTMLEncode($Str) $StrLen = StringLen($Str) Local $Encoded If $StrLen = 0 Then Return '' For $i = 1 To $StrLen $StrChar = StringMid($Str, $i, 1) $Encoded &= '&#' & AscW($StrChar) & ';' Next Return $Encoded EndFunc ;==>_HTMLEncode ;=============================================================================== ; ; Function Name: _HTMLDecode() ; Description: Decode the HTML Entity Number into normal string ; Parameter(s): $HTMLEntityNum - The HTML Entity Number you want to decode. ; ; Requirement(s): AutoIt v3.2.4.9 or higher (Unicode) ; Return Value(s): On Success - Returns decoded strings ; On Failure - Nothing ; ; Author(s): Dhilip89 ; ;=============================================================================== Func _HTMLDecode($Str) Local $Decoded If $Str = '' Then Return '' $X1 = StringRegExp($Str, '&#x(.*?);', 3) $X2 = StringRegExp($Str, '&#(.*?);', 3) $X3 = StringRegExp($Str, '&(.*?);', 3) For $i = 0 To UBound($X1) - 1 Step 1 $Str = StringReplace($Str, '&#x' & $X1[$i] & ';', ChrW(Dec($X1[$i]))) Next For $i = 0 To UBound($X2) - 1 Step 1 $Str = StringReplace($Str, '&#' & $X2[$i] & ';', ChrW($X2[$i])) Next For $i = 0 To UBound($X3) - 1 Step 1 $Str = StringReplace($Str, '&' & $X3[$i] & ';', ChrW(_ArraySearch($Entity, $X3[$i], 0, 0, 1))) Next $Decoded = $Str Return $Decoded EndFunc ;==>_HTMLDecode Download: HTML.au31 point
-
Here's a very simple example using notepad windows. #include <Array.au3> ;Launch 4 notepad windows Run("notepad.exe") Run("notepad.exe") Run("notepad.exe") Run("notepad.exe") ;Wait a couple of seconds for the windows to load Sleep(2000) ;Get a list of the window handles Local $aWinList = WinList("Untitled - Notepad") _ArrayDisplay($aWinList) ;Resize and move windows WinMove($aWinList[1][1], "", 0, 0, 200, 200) WinMove($aWinList[2][1], "", 200, 0, 200, 200) WinMove($aWinList[3][1], "", 0, 200, 200, 200) WinMove($aWinList[4][1], "", 200, 200, 200, 200) Since I'm not sure how new to AutoIt you are, when you see the display of the array, close it, and the script will continue.1 point
-
Maybe this is what you are looking for? Custom URI1 point
-
You can just use @ScriptDir for example to point to the same folder as the script: RunWait (@ComSpec & ' /c cscript.exe "' & @ScriptDir & '\&WORKPLEASE.vbs" ALL /Q /NoCancel')1 point
-
Then lets try to keep the window open: RunWait (@ComSpec & " /k " & 'cscript.exe WORKPLEASE.vbs ALL /Q /NoCancel') /c stands for "close the window", /k for "keep the window open".1 point
-
9 lines: Local $0 = Opt("GUIOnEventMode", 1), $BA[] = ["7", "8", "9", "+", "C", "4", "5", "6", "-", "SqRt", "1", "2", "3", "*", ".", "0", "(", ")", "/", "="], $hGui = GUICreate("Calc", 360, 330, 229, 118), $D = GUICtrlCreateInput("", 8, 8, 344, 31, BitOR(0x00000080, 2)), $1 = GUISetOnEvent(-3, "BP") * GUISetState(@SW_SHOW) For $j = 0 To UBound($BA) - 1 ;make the buttons $2 = GUICtrlCreateButton($BA[$j], Mod($j, 5) * 70 + 7, Int($j / 5) * 70 + 50, 65, 63) + GUICtrlSetOnEvent(-1, "BP") + GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") Next While Sleep(100) ;Throttle WEnd Func BP() ;handle the button press If (GUICtrlRead(@GUI_CtrlId) = "C" ? GUICtrlSetData($D, "") : GUICtrlRead(@GUI_CtrlId) = "SqRt" ? GUICtrlSetData($D, Sqrt(Execute(GUICtrlRead($D)))) : GUICtrlRead(@GUI_CtrlId) = "=" ? GUICtrlSetData($D, Execute(GUICtrlRead($D))) : GUICtrlSetData($D, GUICtrlRead($D) & GUICtrlRead(@GUI_CtrlId))) And @GUI_CtrlId = -3 Then Exit EndFunc ;==>BP1 point
-
12 lines: Local $0 = Opt("GUIOnEventMode", 1), $BA[] = ["7", "8", "9", "+", "C", "4", "5", "6", "-", "SqRt", "1", "2", "3", "*", ".", "0", "(", ")", "/", "="], $hGui = GUICreate("Calc", 360, 330, 229, 118), $D = GUICtrlCreateInput("", 8, 8, 344, 31, BitOR(0x00000080, 2)), $1 = GUISetOnEvent(-3, "Bye") * GUISetState(@SW_SHOW) For $j = 0 to UBound($BA) - 1 ;make the buttons $2 = GUICtrlCreateButton($BA[$j], Mod($j, 5) * 70 + 7, Int($j / 5) * 70 + 50, 65, 63) + GUICtrlSetOnEvent(-1, "BP") + GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") Next While Sleep(100) ;Throttle WEnd Func BP() ;handle the button press $v = GUICtrlRead(@GUI_CtrlId) = "C" ? GUICtrlSetData($D, "") : GUICtrlRead(@GUI_CtrlId) = "SqRt" ? GUICtrlSetData($D, Sqrt(Execute(GUICtrlRead($D)))) : GUICtrlRead(@GUI_CtrlId)= "=" ? GUICtrlSetData($D, Execute(GUICtrlRead($D))) : GUICtrlSetData($D, GUICtrlRead($D) & GUICtrlRead(@GUI_CtrlId)) EndFunc ;==>BP Func Bye() Exit EndFunc ;==>Bye1 point
-
If a spans is clickable it should work fine for example: #include <IE.au3> Local $oIE = _IECreate("https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/link/link.html", 1) _IELoadWait($oIE) Local $oDoc = _IEDocGetObj ($oIE) Local $oSpans = _IETagNameGetCollection($oDoc, "span") For $oSpan In $oSpans If $oSpan.ClassName = "link3" Then _IEAction($oSpan, "Click") Next From my understanding of documentElement, it just reads everything between <html></html> tags, which is what the _IEDocGetObj does so using the same example above I can also get the stylesheet references from the header tag as well. Local $oIE = _IECreate("https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/link/link.html", 1) _IELoadWait($oIE) Local $oDoc = _IEDocGetObj ($oIE) Local $oLinks = _IETagNameGetCollection($oDoc, "link") For $oLink In $oLinks If $oLink.href = "https://www.w3.org/StyleSheets/TR/2016/base.css" Then MsgBox(32, "Found Header Link", $oLink.href) Next1 point
-
AutoPopKeyboard - exclude windows by class
powerofos reacted to johnnyzero for a topic
I came across this existing AutoIT code that works pretty well for what I need: automatically pop up the oncreen keyboard as needed for text input when using "desktop mode" programs on a Windows tablet. Pretty clever: it detects when the cursor changes to an i-beam and assumes you've clicked on a text input field. ;#RequireAdmin #include <WinAPI.au3> #include <GUIConstants.au3> #include <Constants.au3> #Include <WinAPIEx.au3> ;#include <SendMessage.au3> #include <TrayConstants.au3> Opt("TrayOnEventMode", 1) ; Use event trapping for tray menu Opt("TrayMenuMode", 3) ; Default tray menu items will not be shown. $iTrayIBeam = TrayCreateItem("Toggle Cursor I-Beam") TrayItemSetOnEvent(-1, "ToggleIBeam") $iTrayDebug = TrayCreateItem("Debug Tooltips") TrayItemSetOnEvent(-1, "DebugMode") TrayCreateItem("") ; Create a separator line. TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "OnTrayMenuExit") TraySetState() TraySetClick(16) ; Set left click TraySetOnEvent($TRAY_EVENT_PRIMARYUP, "OnTrayIconClick") TraySetIcon("Resources\Enabled.ico") Global $title,$lastTitle,$cursorBlinking, $editDetected, $visible, $PID, $debugMode, $Address, $useIBeam Global $triggerMethod, $lastTriggerMethod, $debugMsg, $lastDebugMsg Global $enabled = True Global $myError = ObjEvent("AutoIt.Error","ErrorTrapper") ; Initialize COM error handler - used for the Excel hack Global Const $TRIGGER_EXCEL = "XLMAIN" Global const $TRIGGER_BROWSER = "BROWSER" Global Const $TRIGGER_CURSORBLINKING = "CB" Global Const $TRIGGER_IBEAM = "IBEAM" While 1 ; Sleep(100) If RegRead('HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl', 'ConvertibleSlateMode') = 0 And $enabled Then $title = WinGetTitle('[ACTIVE]','') $hwnd=WinGetHandle('[ACTIVE]','') $className = _WinAPI_GetClassName($hwnd) $cursorBlinking=False $editDetected=False ;Check if we're using a browser as these are sandboxed.... Also Excel doesn't seem to be coming through local $browser="" Switch $className Case "Chrome_WidgetWin_1" $browser="Chrome" Case "MozillaWindowClass" $browser="FireFox" Case "IEFrame" $browser="IE" Case "XLMain" ;Kludge...!!! Seems an error is thrown if in edit mode, so let's use that to our advantage! Could stop working at any time... local $excelObj = ObjGet('','Excel.Application') if @error and $visible Then ;bit flaky so had to do this to prevent keyboard bouncing up and down $editDetected =True Else If IsObj($excelObj) Then local $excelActiveCell = $excelObj.ActiveCell.Address if @error then $editDetected = True if DebugMode then ShowDebugMessage("Excel - " & $title & ": " & $excelActiveCell,True) $triggerMethod = $TRIGGER_EXCEL Elseif $debugMode Then ShowDebugMessage("Could not get Excel object") EndIf EndIf EndSwitch ;If we're not already in Edit Mode, check if we've got anything in the browser title to indicate edit mode if $browser<>"" and not $editDetected Then $className=$browser if StringInStr($title," [input]") then $editDetected=True $triggerMethod= $TRIGGER_BROWSER EndIf EndIf ;If we still haven't got anything, look for a 'blinking cursor' if not $editDetected Then $Info = _WinAPI_GetGUIThreadInfo(_WinAPI_GetWindowThreadProcessId($hwnd, $PID)) If Not @error Then $editDetected = ($info[0] = 1) $cursorBlinking=$editDetected if $editDetected then $triggerMethod = $TRIGGER_CURSORBLINKING EndIf ;If all else fails, IBeam cursor... if not $editDetected and $useIBeam Then $cursor = MouseGetCursor() $editDetected = ($cursor =5) ; 5 is for an I-Beam cursor EndIf if $debugMode then $debugMsg="Variables - Keyboard: " & $visible & ", Trigger: " & $triggerMethod & ", Last Trigger: " & $lastTriggerMethod & ", EditDetected: " & $editDetected if $debugMsg <> $lastDebugMsg then ShowDebugMessage ($debugMsg) $lastDebugMsg=$debugMsg EndIf If $editDetected and (not $visible or $title <> $lastTitle) Then $keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"') ;Can we replace this with a PostMessage??? $visible = True ElseIf not $editDetected and $visible Then HideKeyboard() $visible = False EndIf $lastTitle = $title $lastTriggerMethod = $triggerMethod EndIf WEnd Func OnTrayMenuExit() Exit EndFunc ;Toggle Enabled/Disabled mode Func OnTrayIconClick() if $enabled Then TraySetIcon("Resources\Disabled.ico") $enabled=False Else TraySetIcon("Resources\Enabled.ico") $enabled=True EndIf ;ConsoleWrite("Single" & @CRLF) EndFunc Func ErrorTrapper() Local $err = $myError.number If $err = 0 Then $err = -1 SetError($err) ; to check for after this function returns if $debugMode then ShowDebugMessage ("[ErrorTrapper] Error Code: " & $err) Endfunc ;Tray Menu - Show us what's happening... Func DebugMode() $debugMode = not $debugMode SetTrayMenuCheck($iTrayDebug, $debugMode) EndFunc ;Tray Menu -Toggle use of I-Beam as a fallback edit mode check method Func ToggleIBeam() $useIBeam = not $useIBeam SetTrayMenuCheck($iTrayIBeam, $useIBeam) EndFunc Func SetTrayMenuCheck($controlID, $checked) Local $state If $checked then $state = $TRAY_CHECKED Else $state = $TRAY_UNCHECKED EndIf TrayItemSetState($controlID, $state) EndFunc Func HideKeyboard() Local Const $WM_MESSAGE = 0x112 Local Const $WM_WPARAM = 0xF060 ;Local Const $AUTOIT_CLASS = "IPTip_Main_Window" Local $hClass = _WinAPI_FindWindow("IPTip_Main_Window","") ;WinGetHandle("[CLASS:IPTip_Main_Window]") if @error then If $debugMode Then ShowDebugMessage("[HideKeyboard] Error occured in getting keyboard handle");$hClass = GetKBHandle() Else If $debugMode Then ShowDebugMessage("[HideKeyboard] Handle " & $hClass) EndIf if not @error Then if $debugMode then ShowDebugMessage ("[HideKeyboard] Hidekeyboard called") Local $dll = DllOpen("User32.dll") Local $res=DllCall($dll, "bool", "PostMessage", "HWND", $hClass,"UINT",$WM_MESSAGE, "WPARAM",$WM_WPARAM,"LPARAM","0") if @error and $debugMode then ShowDebugMessage("[HideKeyboard] Error occured in PostMessage") Else if $debugMode then ToolTip("[HideKeyboard] error occured in getting handle") EndIf EndFunc Func ShowDebugMessage($msg, $toolTipOnly = False) ToolTip ($msg,MouseGetPos(0)+20, MouseGetPos(1)-50) if not $toolTipOnly then ConsoleWrite($msg & @CRLF) EndFunc For the most part, it works perfectly. However, if you click on a text field in a Metro app (or the Search field on the Start screen), the keyboard pops up as it should, but it gets stuck and then you can't get rid of it. Metro already has the ability to automatically popup/hide the onscreen keyboard as needed, and I assume my script is conflicting with that. So I think I need to use WinActive or some other function to exclude the following window classes: Windows.UI.Core.CoreWindow (Metro apps) ImmersiveLauncher (the Start screen) I'm not a programmer (just a bit of experience with AutoIT and Autohotkey), so any help or advice will be much appreciated. Please note: by design, this script will only pop up the keyboard if it detects that you're in "tablet mode" by checking for a 0 dword value of the following registry key: HKLMSYSTEMCurrentControlSetControlPriorityControlConvertibleSlateMode So if you want to test the script on a non-tablet Windows 8 device, you'll need to temporarily set that value in your registry. Or, you could remove that part of the code. Thanks!1 point -
Try this: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $CloseGUI = True $Form1 = GUICreate("Close GUI", 615, 199, 642, 406) $Label1 = GUICtrlCreateLabel(" Open Label 2", 232, 24, 74, 17) $Label2 = GUICtrlCreateLabel(" Label2", 240, 104, 66, 17) GUICtrlSetState($Label2, $GUI_HIDE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE If $CloseGUI Then Exit Case $Label1 $CloseGUI = False GUICtrlSetState($Label2, $GUI_Show) Case $Label2 $CloseGUI = True GUICtrlSetState($Label2, $GUI_HIDE) ; When $Lable2 is hidden, it means the screen is in default mode. Close button should be enabled now... EndSwitch WEnd1 point
-
PSEXEC executing autoit exe
Piotr_Hodl reacted to AdmiralAlkex for a topic
Hello and Welcome to the forum! Your question is how to write to STDOUT? Did you search the helpfile for STDOUT? Use ConsoleWrite() and note that part in the helpfile about compiling to CUI/console app.1 point -
Something for you to start with: $text = '' $n = _GUICtrlListView_GetItemCount($ListView1) For $i = 0 To $n - 1 $text &= _GUICtrlListView_GetItemTextString($ListView1, $i) & @CRLF Next ClipPut($text)1 point