Recently Browsing 0 members
No registered users viewing this page.
I always try to work with old Windows 10 versions as much as possible because I know mane compatibility issues with Windows 10 upgrading.
But I couldn't do anything else (I got drivers problem), and nothing couldn't help me besides upgrading, so I upgraded from 1807 to 1903.
And...get another problem 😃
I use AutoitX library in external project like this.
While ObjectAutoit.WinExists("",WindowHeader) Cycle
After upgrade I get that this line code
become extremely low - ~ 20 seconds even if 10 windows open. But before upgrade it takes 0.5 s for a max.
And every time that this code line passes through - it takes ~20s, (20.115, for example), not less, not more. Something pauses it to work.
How can I diagnose, what is that?
I tried reinstall whole AutoIt, but no results.
Thanks to all.
Hi all, I am writing some scripts to control some lab equipment, and sometimes I observe that the script "misses" one of the steps, leading to cascading errors. For example, at one part of the code I wrote this:
Most of the times this works, but I found that in some occasions the windows fail to close. Then, the code becomes a mess, because a second instance of the program will launch, and both windows now have the same title. I think I can solve this problem with this code:
I would like to know if anybody has any other suggestions for this kind of redundant code. Thanks,
I'm having some trouble restoring a program which uses a normal AutoIT-GUI and is used as a ToolKit for our customers to open different (external) tools, check their network connections or ping different destinations. Almost all customers are running this script on Win7 x64.
What do I want to do?
When the program is already running and the user tries to start it for a second time, it should exit the second instance after activating/restoring the first instance.
What did I do to integrate this?
I used a little piece of script found on the forums to prevent opening a second instance and modified it as follows:
$g_szVersion = "VSOL ToolKit" If WinExists($g_szVersion) Then Local $gState = WinGetState($g_szVersion) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinSetState($g_szVersion,"",@SW_SHOW) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinSetState($g_szVersion,"",@SW_RESTORE) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinActivate($g_szVersion) Exit EndIf AutoItWinSetTitle($g_szVersion) I have tried it with only the @SW_SHOW, only the @SW_RESTORE, both of them in a different order, same difference, it doesn't work.
What does happen then?
It detects the current state (when it's minimized) as '5', which means enabled and hidden. After setting the state to show, the state changes to 7. Restoring doesn't change the state. But what is really odd, is that the window doesn't appear but AutoIt seems to create a néw window with the same title as the existing one.
It doesn't matter if the window was originally minimized by clicking the minimize button in the GUI or by a line of code in my script. For example, when users open a software package from within my script, a similar function to this one will be called:
Func VSOL_FFTOOLS_SHOW_DOWNLOADS() GUISetState(@SW_MINIMIZE,$VSOL_BACKEND) ShellExecute(@UserProfileDir & "\Downloads") EndFunc The only thing that does work, is when the window is running in a non-minimized state (somewhere behind the current window), it gets activated and receives the focus when trying to start the second instance.
If anyone could help me out with this one, I'd be forever thankful :-)
Thanks in advance!
Is it possible , and how can I read and write txt files from Icloud (apple service) ?
Let me try to explain my application.
On my Ipad and Iphone I create txt files. On my windows computer it is possible to read and modify these files manually, by logging in on www.icloud.com.
What I want to make is an auto-it script who reads the txt file and create an new txt file on www.icloud.com, so I can acces these on my ipad and/or phone.
This code will read text data from txt file. However, if I use '$Newtext &= $convert' then $convert is saved as strings, not hex value.
For example, if $convert = 0x300020FF and $bNewText = Test then the result is 0x333030303230464654657374. (Wrong)
What I want is 0x300020FF54657374. How can I modify my script?
For $i = $y-1 To Ubound($split) - 1 $convert = "0x" & $split[$i] $Newtext &= $convert $NewLen_hex = BinaryLen ($convert) $i=$i+1 $split[$i] = $split[$i] $split[$i] = StringRegExpReplace($split[$i], "<cf>", @CRLF) $split[$i] = StringRegExpReplace($split[$i], "<lf>", @LF) $split[$i] = StringRegExpReplace($split[$i], "<cr>", @CR) $bNewText = _WinAPI_WideCharToMultiByte($split[$i], $CP_SHIFT_JIS) if $i = Ubound($split) - 1 Then $bNewText &= Chr(0) EndIf $Newtext &= $bNewText $NewLen = $NewLen_hex + BinaryLen ($bNewText) Next (...) (...) $Newfile = BinaryMid($Newfile_header,1) & BinaryMid($Newtext,1) $hNewfile = FileOpen ("NEW_"&$Name, 2+16) FileWrite ($hNewfile, $Newfile) FileClose ($hNewfile) TrayTip ("Importer", "Finish!", 3) sleep (3000)