
XGamerGuide
Active Members-
Posts
51 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by XGamerGuide
-
Is there a on change event?
XGamerGuide replied to XGamerGuide's topic in AutoIt GUI Help and Support
Thanks. I use WM_COMMAND. -
π Hey I want to call a function when something changes on an element in my GUI. That should work for a combo box (with $CBS_DROPDOWNLIST) when I select an item and for a text input when I type.
-
Execute() in compiled script
XGamerGuide replied to XGamerGuide's topic in AutoIt General Help and Support
my compiler command -
Execute() in compiled script
XGamerGuide replied to XGamerGuide's topic in AutoIt General Help and Support
I hope that it is even possible to execute strings in compiled scripts π -
While True ConsoleWrite(@CRLF & ">>> ") ConsoleWrite(Execute(ConsoleRead())) WEnd I will execute Autoit in a compiles script. But this spam this when its compiled:
-
Rename all Files in a Folder
XGamerGuide replied to XGamerGuide's topic in AutoIt General Help and Support
I'm looking for an algorithm that also goes into subfolders -
I want to rename all subfolders and files of a certain folder. They should all have the same name. The program should also rename sub-folders that are in sub-folders. And so on ... _FileReadToArray somehow doesn't work. I imported #include <File.au3> #include <Array.au3> but I get I only found this function π
-
Can't compile with more options
XGamerGuide replied to XGamerGuide's topic in AutoIt General Help and Support
oh I only see now that there is an : -
If I compile with more options then no EXE is created and the window closes again immediately. If I let Tidy walk over it, he'll stop in one place. My Code: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form = GUICreate("auWin", 525, 350) WinSetOnTop($Form, "", 1) $Label1 = GUICtrlCreateLabel("title/class (optional):", 8, 10, 100, 17) $Input1 = GUICtrlCreateInput("", 104, 8, 241, 21) $Label2 = GUICtrlCreateLabel("handle (optinal):", 8, 34, 78, 17) $Input2 = GUICtrlCreateInput("", 90, 32, 255, 21) $Radio1 = GUICtrlCreateRadio("Match the title from the start", 352, 8, 153, 17) GUICtrlSetState(-1, 1) $Radio2 = GUICtrlCreateRadio("Match any substring in the title", 352, 32, 169, 17) $Radio3 = GUICtrlCreateRadio("Exact title match", 352, 56, 105, 17) $Radio4 = GUICtrlCreateRadio("Advanced mode", 352, 80, 105, 17) $Combo1 = GUICtrlCreateCombo("display", 8, 64, 97, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "flash|close|kill|hide|show|minimize|maximize|restore|disable|enable|onTop|notOnTop|transparency|title|move|getPos|getText") $Button1 = GUICtrlCreateButton("START", 8, 96, 97, 41) $Button2 = GUICtrlCreateButton("Window Titles and Text (Advanced)", 112, 64, 233, 33) $Progress1 = GUICtrlCreateProgress(112, 104, 401, 33) $Edit1 = GUICtrlCreateEdit("", 8, 144, 505, 193, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY)) GUICtrlSetData(-1, "") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If GUICtrlRead($Radio1) = 1 Then AutoItSetOption("WinTitleMatchMode", 1) If GUICtrlRead($Radio2) = 1 Then AutoItSetOption("WinTitleMatchMode", 2) If GUICtrlRead($Radio3) = 1 Then AutoItSetOption("WinTitleMatchMode", 3) If GUICtrlRead($Radio4) = 1 Then AutoItSetOption("WinTitleMatchMode", 4) $title = GUICtrlRead($Input1) $fromInput2 = GUICtrlRead($Input2) $handle = Ptr($fromInput2) If $fromInput2 <> "" And $handle = "" Then $handle = "not a handle" If $title = "" And $handle = "" Then $winList = WinList() ElseIf $title = "" Then If WinExists($handle) Then local $GlobalwinList = [[1,""],[WinGetTitle($handle),$handle]] Else local $GlobalwinList = [[0,""]] EndIf $winList = $GlobalwinList ElseIf $handle = "" Then $winList = WinList($title) Else WinSetOnTop($Form, "", 0) MsgBox(16, "ERROR", "Please enter title, handle or nothing") WinSetOnTop($Form, "", 1) ContinueLoop EndIf $combo = GUICtrlRead($Combo1) If $combo = "transparency" Then WinSetOnTop($Form, "", 0) $trans = InputBox("transparency", "Set the transparency to a value between 0 and 255", "255") if $trans = "" Then ContinueLoop WinSetOnTop($Form, "", 1) EndIf If $combo = "title" Then WinSetOnTop($Form, "", 0) $newTitle = InputBox("title", "Set the title") if $newTitle = "" Then ContinueLoop WinSetOnTop($Form, "", 1) EndIf If $combo = "move" Then WinSetOnTop($Form, "", 0) $x = InputBox("X", "X coordinate to move to", "0") if $x = "" Then ContinueLoop $y = InputBox("Y", "Y coordinate to move to", "0") if $y = "" Then ContinueLoop If MsgBox(4, "size?", "Would you like to specify a size?") = 6 Then $width = InputBox("width", "Width", "500") if $width = "" Then ContinueLoop $height = InputBox("height", "Height", "500") if $height = "" Then ContinueLoop $resize = True Else $resize = False EndIf WinSetOnTop($Form, "", 1) EndIf GUICtrlSetData($Edit1, "") GUICtrlSetData($Progress1, 0) $i = 0 While $i < $winList[0][0] $i += 1 $name = $winList[$i][0] $h = $winList[$i][1] If $winList[$i][0] <> "auWin" Then Switch $combo Case "display": $txt = "" Case "flash": $txt = WinFlash($h) Case "close": $txt = WinClose($h) Case "kill": $txt = WinKill($h) Case "hide": $txt = WinSetState($h, "", @SW_HIDE) Case "show": $txt = WinSetState($h, "", @SW_SHOW) Case "minimize": $txt = WinSetState($h, "", @SW_MINIMIZE) Case "maximize": $txt = WinSetState($h, "", @SW_MAXIMIZE) Case "restore": $txt = WinSetState($h, "", @SW_RESTORE) Case "disable": $txt = WinSetState($h, "", @SW_DISABLE) Case "enable": $txt = WinSetState($h, "", @SW_ENABLE) Case "onTop": $txt = WinSetOnTop($h, "", 1) Case "notOnTop": $txt = WinSetOnTop($h, "", 0) Case "transparency": $txt = WinSetTrans($h, "", $trans) Case "title": $txt = WinSetTitle($h, "", $newTitle) Case "move": If $resize Then $txt = WinMove($h, "", $x, $y, $width, $height) Else $txt = WinMove($h, "", $x, $y) EndIf Case "getPos" $pos = WinGetPos($h) $txt = "X: " & $pos[0] & " Y: " & $pos[1] & " Width: " & $pos[2] & " Height: " & $pos[3] Case "getText": $txt = @CRLF & WinGetText($h) EndSwitch GUICtrlSetData($Edit1, "[" & $h & "] (" & $name & ") " & $txt & @CRLF & GUICtrlRead($Edit1)) EndIf GUICtrlSetData($Progress1, $i / $winList[0][0] * 100) WEnd GUICtrlSetData($Progress1, 100) Case $Button2 ShellExecute("https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm") EndSwitch WEnd By the way, I program in Viersual Stadio Code. I have the full version of SciTE and can therefore run my program with F5. When this happens, my program is first compared with this one EXE (C:\Program Files (x86)\AutoIt3\Au3Check.exe) , which checks whether my program does not work. I get a syntax error with Case. I think it might have something to do with it.
-
That's all you need for it: If WinExists($p) Then $ret = WinGetTitle($p) EndIf I can manage my own function that turns it into a 2d array, but my question was why it doesn't work with WinList(), although it should actually work.
-
The text can also be empty. For this you also have to use WinExists() to check whether the window exists.
-
Besides, I think the title can also be empty: #include <Array.au3> _ArrayDisplay(WinList())
-
My program is designed to process the output from a WinList() function. But there is an event in my program where the handle is used instead of the title. Of course I can also write my own function like you wrote one, but I was hoping that it would work without it.
-
I'm trying to call WinList() with a handle. That should be possible: But I only get back an 2d array that looks like this: --------- 0 | (That means no window was found.) It's not the window or the handle. When I call other functions like WinExists() or WinGetHandle() it works. Is it because of me, the description in the reference or because of Autoit who makes a mistake? No, because of the rest of my program I don't want to use WinGetTitle() because the format of WinList() has to be kept. Alternatively, I could create a 2d array myself, but it should also work with WinList() ... I hope.
-
? Thatβs very helpful, thank you
-
I'm trying to make a list that consists of plates that can be moved. You should also be able to interact with them with a double click. Unfortunately, my GUI knowledge is not enough to solve this alone. I don't even know what to look for
-
Then I would have to remove the string StringReplace($input, '"' & "'", "") but I think that is not possible with IsDeclared()
-
#Au3Stripper_Parameters=/RenameMinimum HotKeySet("{Space}", "_test") Func _test() MsgBox(0+64, "Test", "Test") Exit EndFunc While 1 sleep(1000) WEnd This is going to be HotKeySet("{Space}", "_test") Func _0() MsgBox(0+64, "Test", "Test") EndFunc While 1 sleep(1000) WEnd The script below gives an error. I will program that _test will also be changed to _0. I will also add something like that: If InputBox("", "Input:") = "test" Then ConsoleWrite( "Test" & @CRLF ) EndIf $i = 0 While $i < 10 $i = $i + 1 ConsoleWrite( $i & @CRLF ) WEnd This is going to be If InputBox("","Input:")="test" Then ConsoleWrite("Test"&@CRLF) $i=0 While $i<10 $i+=1 ConsoleWrite($i&@CRLF) WEnd Why do I want it to be as small as possible? My program will have a function to encode the code base64. Large programs in base64 take some time to decode. I would like to shorten this here. When it's ready I'll publish it here
-
As far as I know, Stripper does not support functions that have a variable or other function in a string when renaming variables. This includes, for example, HotKeySet(). I will change that in my program.
-
I'll match the original with the Stripers' result
-
I mean base64
-
Yeah, I just do it for fun. In the meantime I have decided to use Au3Wrapper and to repair the functions that are not working. For example HotKeySet(). Also, I'll do things like If 1 Then ; My Code EndIf to If 1 Then ; My Code and other things
-
I have more plans for my program than what Tidy can do
-
Thanks, works great In my program it is also base54 encoded. That makes the file 30% larger after times. I don't want it to take so long to decode.
-
After compression, the script should only be read by the Autoit interpreter and no longer by programmers. This makes the file smaller