7 posts in this topic
I have a bit of code that works on my old Win10 PC, that fails on my new Win10 PC, and I think the only significant difference is the version of Autoit - old PC has 3.3.12, new has 3.3.14.
I couldn't find anything mentioned in the change logs though, so perhaps I'm wrong.
Anyway, the code to replicate my issue is:
Test('username', 'DOMAIN') ; THIS ERRORS: ;Test('localun', 'DOMAIN') ; THIS ERRORS: ;Test(' ', ' ') ; THIS ERRORS: ;Test('', '') ; THIS ERRORS: ;Test('localun', '') ; THIS ERRORS: ;Test('', 'DOMAIN') Func Test($un, $dom) $compName = 'PCNAME' $FullName = '.' $Description = '.' ; get the WIM object $objWMIService = ObjGet("winmgmts:\\" & $compName & "\root\cimv2") ; get default user full name and description $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") If IsObj($objAccount) Then $FullName = $objAccount.FullName $Description = $objAccount.Description EndIf ConsoleWrite($FullName & @CRLF) ConsoleWrite($Description & @CRLF) Return EndFunc
On my old PC this code will output just . and . for each of those line currently commented out. Which is fine.
On my new PC any of those commented out lines of code cause an error, and the script won't even compile.
$objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") $objAccount = $objWMIService^ ERROR I'm very much a newb with the WMI stuff and objects, but it looks like the .Get property is failing when either $un or $dom aren't valid in v3.3.14, whereas in 3.3.12 the .Get would fail to return an object, which is then caught by the If statement.
Am I on track with this? Is there some new/better way to code the example so that 3.3.14 will compile it?
Profiler - yet another backup script for Firefox and Thunderbird profiles
It automatically detects the last recently used profile directories of Firefox and Thunderbird (installed versions, no portables).
Clicking the Backup-Button creates a complete Backup of the found profiles with a timestamp.
Restore deletes the according profile dir and extracts the content of the selected archive into the profile directory.
Uses Winrar as compression tool, but feel free to change it to your needs
I've written the code below which launches chrome in incognito mode and then proceeds to go to the autoit website.
From my understanding, the Run() command is also supposed to output the PID number related to the application that got launched from the Run command.
However when I run the below lines, it outputs a PID number that is different from the newly launched chrome browser's PID number, does anyone know why and possibly explain how I could retrieve the accurate PID number associated with the newly launched browser?
Global $iPid = Run(@ComSpec & ' /c start chrome.exe https://www.autoitscript.com/forum/ -incognito' ,"", "") msgbox(0,"",$iPid) Thank you,
I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods:
ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried:
ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried:
But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome?
Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com
I'm trying to get the output data from https://www.guilded.gg but it uses a web app that generates that output on the fly and this doesn't show up in the page source.
Only in web inspector of each browser does this data show up. How do I read this data in autoit (equivalent to the web inspector)