4 posts in this topic
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 have a question
about the display language of the system
How can I get the current display language and how can I change it by autoit
Of course, if this is possible
Greetings to all and hope you help me
I'm making an app that among other things has the system info feature, where it displays stuff like the system version, build, CPU and ram stats, etc.
So, I haven't been able to find anywhere a way to access the following things (is there even?):
Windows version (not like WIN_10, but the version like 1607, or 1511 Windows edition like professional, home, education, etc. information whether the Windows is registered or not (optionally the registrant's name) the type of the currently logged-in user (e.g., administrator) computer manufacturer and model (e.g., dell inc. Inspiron n5110 boot mode (e.g., safe, normal) CPU tempreture I'd appreciate a lot if any of you could help me with any of the things from above; it would mean a lot to me.
Have a great day.
I was looking for a way to find out how long my PC had been running a few weeks ago and had trouble finding something that satisfied my needs, I found a Visual Basic Script that worked but found it too long. But searching trough AutoIt WINAPI help found that it really was as simple as the following little script.
Local $Uptime = _WinAPI_StrFromTimeInterval(_WinAPI_GetTickCount())
MsgBox(0, '', "PC Uptime ==> " & $UpTime)
Hope it helps...
Here is my _DirGetSizeEx function. It allows you to get the size of a directory, with additional filters for including, excluding files and folders.
; #FUNCTION#==================================================================================================================== ; Name ..........: _DirGetSizeEx ; Description ...: Returns the size in bytes of a file list by extension. ; Syntax ........: _DirGetSizeEx($sDir[, $sMask = "*"[, $iFlag = 0]]) ; Parameters ....: $sDir - The directory to search in. ; $sMask - [optional] Filter for results. Default is "*" (all). ; Filter for result. Multiple filters must be separated by ";" ; Use "|" to separate 3 possible sets of filters: "Include|Exclude|Exclude_Folders" ; Include = Files/Folders to include (default = "*" [all]) ; Exclude = Files/Folders to exclude (default = "" [none]) ; Exclude_Folders = exclude defined folders (default = "" [none]). Only used if $iFlag = 0 or 1 ; $iFlag - [optional] 0 (default) = Returns the size ; 1 = Extended mode is On -> returns an array that contains the file of each file (see Remarks). ; 2 = Don't get the size of files in subdirectories (recursive mode is Off) ; Return values .: Success = The size in bytes, or a single dimension array ; Failure = -1 and sets the @error flag to 1 if the path doesn't exist. ; Author ........: jguinch ; Remarks .......: If you use the extended mode then the array returned from this function is a single dimension array containing the followingelements: ; $aArray = Files count ; $aArray = Total files size ; $aArray = Full name of 1st file ; $aArray = Size of 1st file ; $aArray = Full name of 2nd file ; $aArray = Size of 2nd file ; $aArray[n] = Size of nth file ; $aArray[n] = Size of nth file ;=============================================================================================================================== Func _DirGetSizeEx($sDir, $sMask = "*", $iFlag = 0); OK If NOT FileExists($sDir) Then Return SetError(1, 0, -1) If NOT StringInStr(FileGetAttrib($sDir), "D") Then Return SetError(1, 0, -1) Local $iExtMode = BitAND($iFlag, 1) > 0 Local $iRecMode = NOT BitAND($iFlag, 2) > 0 Local $aDirs = [ StringRegExpReplace($sDir, "\\$", "") ] Local $iCountDir = 0, $iCountFile = 0, $n = 0, $iSize = 0, $iFullSize = 0 Local $aFiles = [] Local $hSearch, $sFileName, $sRegexFilesInclude, $sRegexFilesExclude = "^$", $sRegexFoldersExclude = "^$" Local $sRegexMask = StringReplace( StringReplace( StringReplace($sMask, "|", "\|") , "?", "\E(?:.|.?$)\Q"), "*", "\E.*?\Q") Local $aFilters = StringSplit($sRegexMask, "\|", 3) $sRegexFilesInclude = "(?i)^(?:" & StringRegExpReplace(StringReplace($aFilters, ";", "|") , "([^|]+)", "\\Q$1\\E") & ")$" If UBound($aFilters) > 1 Then $sRegexFilesExclude = "(?i)^(?:" & StringRegExpReplace(StringReplace($aFilters, ";", "|") , "([^|]+)", "\\Q$1\\E") & ")$" If UBound($aFilters) > 2 Then $sRegexFoldersExclude = "(?i)^(?:" & StringRegExpReplace(StringReplace($aFilters, ";", "|") , "([^|]+)", "\\Q$1\\E") & ")$" While 1 $hSearch = FileFindFirstFile( $aDirs[$n] & "\*.*" ) If $hSearch <> -1 Then While 1 $sFileName = FileFindNextFile($hSearch) If @error Then ExitLoop If @Extended Then If NOT StringRegExp($sFileName, $sRegexFoldersExclude) Then $iCountDir += 1 If $iCountDir >= UBound($aDirs) Then Redim $aDirs[UBound($aDirs) * 2] $aDirs[$iCountDir] = $aDirs[$n] & "\" & $sFileName EndIf Else If StringRegExp($sFileName, $sRegexFilesInclude) AND NOT StringRegExp($sFileName, $sRegexFilesExclude) Then $iSize = FileGetSize($aDirs[$n] & "\" &$sFileName) $iFullSize += $iSize If $iExtMode Then $iCountFile += 1 If $iCountFile >= UBound($aFiles) Then Redim $aFiles[UBound($aFiles) * 2] $aFiles[$iCountFile] = $aDirs[$n] & "\" &$sFileName $aFiles[$iCountFile] = $iSize EndIf EndIf EndIf WEnd If NOT $iRecMode Then ExitLoop EndIf FileClose($hSearch) If $n = $iCountDir Then ExitLoop $n += 1 WEnd If NOT $iExtMode Then Return $iFullSize Redim $aFiles[$iCountFile + 1] $aFiles = $iCountFile $aFiles = $iFullSize Return $aFiles EndFunc
Old functions :