Jump to content

Search the Community

Showing results for tags 'Check'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 17 results

  1. hello autoit team is there any wey to check if any process run as admin or no? i mean e.g if i want to restart any process, now i have the ability to get the process path and commands line what i need is a wey to check if the process was runing as admin or no to restart it with the same state. here is the part that am using it to restart the process func _processRestart($i_pid, $s_ProcessPath) if not (ProcessExists($i_ProcessPid)) then return SetError(1, 0, -1) local $s_ProcessWorkDir = _WinAPI_GetProcessWorkingDirectory($i_ProcessPid) ProcessClose($i_ProcessPid) ProcessWaitClose($i_ProcessPid) ProcessWait(ShellExecute($i_pid,"", $s_ProcessWorkDir)) ProcessesGetList() return true endFunc thanks in advance
  2. Detect if the focus item is a button or check box Hello everyone. My dears I have a problem When I try to use ControlGetFocus function it doesn't recognize the check boxes. The result is that the selector is a button Although the specified is a check box but I want a way to identify the check boxes. Because I want to make a tool that helps screen readers users I hope you have the solution. Thank you in advance.
  3. I'm trying to check for the existance of a file, on logon the file is there, then gets deleted and after a while recreated. I'm using this code: Sleep(100) If not FileExists($sFile) Then Sleep(150) If FileExists($sFile) Then GUICtrlSendToDummy($iDummy) What happens is this: User logs on, the file is present, or at least it usually is After about 10 seconds the file gets deleted Then after about 50 seconds the file gets created again, this is when I need the check, because now the process is finished. The above code is part of a pretty long do....until false loop running an animation. The problem is that sometimes this code fails. Without the sleep statements it didn't work at all so I think this is a timing issue. Pretty primitive code I admit, there must be a better way...
  4. Hi, made this, may come handy to someone ^^ #Code with comments #NoTrayIcon Global $b = "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player", $url[3] = [$b & "_ax.exe", $b & ".exe", $b & "_ppapi.exe"] HttpSetUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36") ;Just trying to fit in Global $expectSameTableOrder = 0 ;WebSite table order may change, so use this as time concious setting $cur = _CurVer() ;Grabs the lastest versions available from adobe's website $ver = _GetFlashVersions() ;Grabs installed versions from the registry ;compare the versions For $x = 0 To 2 ;UBound($ver)-1 Local $idx = 0, $_match = 0 If $expectSameTableOrder Then $_match = 1 $idx = $x + 1 Else Do $_match = StringInStr($cur[$idx][1], $ver[$x][1]) $idx += 1 Until ($idx > (UBound($cur) - 1)) Or ($_match > 0) EndIf If $ver[$x][0] = "" Then $_match=0 If $_match > 0 Then If _VersionCompare($cur[$idx - 1][0], $ver[$x][0]) = 1 Then ;// outdated download url is $url[$x] ConsoleWrite("[Lastest:" & $cur[$x][0] & "|Installed:" & $ver[$x][0] & "]" & @TAB & $cur[$x][1] & " its outdated!" & @LF) EndIf EndIf Next Exit Func _CurVer() ;[0]ActiveX (IE) [1]NPAPI (firefox) [2]PPAPI (chrome/opera) Local $__page = BinaryToString(InetRead("https://www.adobe.com/software/flash/about/", 3), 4) Local $__rex = StringRegExp($__page, '(?s)(?:<td[^>]*>(.*?)(?:\\|</td>))', 3) ;_ArrayDisplay($__rex) Local $__ret[1][2], $_skip = 0 If @OSBuild >= 9200 Then $_skip = 1 For $x = 1 To 8 Step 2 If Not (($x = 1 And $_skip) Or ($x = 3 And Not $_skip)) Then $p = UBound($__ret) If $x < 6 Then ReDim $__ret[$p + 1][2] $__ret[$p - 1][1] = $__rex[$x] $__ret[$p - 1][0] = $__rex[$x + 1] EndIf Next Return $__ret EndFunc ;==>_CurVer Func _GetFlashVersions() Local $__fpver[3][2] = [['', "ActiveX"], ['', "PPAPI"], ['', "NPAPI"]] $__fpver[0][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerActiveX", "Version") ;IE $__fpver[1][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerPlugin", "Version") ;Firefox $__fpver[2][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerPepper", "Version") ;Chrome/opera Return $__fpver EndFunc ;==>_GetFlashVersions Func _VersionCompare($sVersion1, $sVersion2) If $sVersion1 = $sVersion2 Then Return 0 Local $aVersion1 = StringSplit($sVersion1, ".,"), _ $aVersion2 = StringSplit($sVersion2, ".,") If UBound($aVersion1) <> UBound($aVersion2) Or UBound($aVersion1) = 0 Then ; Compare as Strings If $sVersion1 > $sVersion2 Then Return SetExtended(1, 1) ; @extended set to 1 for string comparison. ElseIf $sVersion1 < $sVersion2 Then Return SetExtended(1, -1) ; @extended set to 1 for string comparison. EndIf Else For $i = 1 To UBound($aVersion1) - 1 ; Compare this segment as numbers If StringIsDigit($aVersion1[$i]) And StringIsDigit($aVersion2[$i]) And _ StringLen($aVersion1[$i]) = StringLen($aVersion2[$i]) Then ; <<<<<<<<<<<<<<<<<<<<<< If Number($aVersion1[$i]) > Number($aVersion2[$i]) Then Return SetExtended(2, 1) ; @extended set to 2 for number comparison. ElseIf Number($aVersion1[$i]) < Number($aVersion2[$i]) Then Return SetExtended(2, -1) ; @extended set to 2 for number comparison. EndIf Else ; Compare the segment as strings If $aVersion1[$i] > $aVersion2[$i] Then Return SetExtended(1, 1) ; @extended set to 1 for string comparison. ElseIf $aVersion1[$i] < $aVersion2[$i] Then Return SetExtended(1, -1) ; @extended set to 1 for string comparison. EndIf EndIf Next EndIf ; This point should never be reached Return SetError(2, 0, 0) EndFunc ;==>_VersionCompare Thanks to @jguinch for helping me with the regex EDIT1: Code updated, now skips inexistent installations, added $expectSameTableOrder for timewise routines, _VersionCompare fixed (didn't add "= 1" in the if statement,now seems to be working fine For someone looking for a GUI http://pxc-coding.com/portfolio/alternative-flash-player-auto-updater/ [Not mine]
  5. Hi, I have written a programm offering me a lot of hotkeys to work with windows. All in all there are 40 hotkeys defined now. Now I made a portable version of it. But in this there are a lot of hotkeys useless. So I had to change some things. But that's not my point. Because of all these many hotkeys I sometimes know I made a hotkey but what were the keys I have to press. So I want to make a little help GUI or html or whatever. Now I'm interested to automate my own list of hotkeys. How can I collect all my hotkeys and necessary keys for this in a list? Regard, Conrad
  6. Hello reader, I would like to know if and/or how it is possible to check if recycle bin has files or folders in it. So my code would eventually be like this (if these were the commands) if fileshere then FileRecycleEmpty() ;empties recylce bin endif
  7. I was needing to check all my connected networks and check if there is internet connection. so I wrote this function. #include <MsgBoxConstants.au3> #include <Array.au3> Global $NLM_ENUM_NETWORK_CONNECTED = 0x01 ;~ Global $NLM_ENUM_NETWORK_DISCONNECTED = 0x02 ;~ Global $NLM_ENUM_NETWORK_ALL = 0x03 Global Enum $eName, $eIsConectedtoInternet Local $aNetworks = GetNetWorks() If @extended Then For $i = 0 To @extended - 1 ConsoleWrite("NetWork Name: " & $aNetworks[$i][$eName] & "| IsConectedToInternet: " & $aNetworks[$i][$eIsConectedtoInternet] & @CRLF) Next _ArrayDisplay($aNetworks, "NetWork Name|NetWork Is Conected to Internet") EndIf ;~ Success: Return an 2DArray[][] and sets @extended Ubound of Array ;~ Failure: Return 0 and set @extended 0 Func GetNetWorks($NLM_ENUM_NETWORK = $NLM_ENUM_NETWORK_CONNECTED) Local $aNetworks[0][2] ;[n][0]NetWorks Name|[n][1]isConnectedtoInternet Local $INetworks = 0 Local $ReDim = 0 Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $oINetworkListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") ;Create INetworkListManager Object by CLSID If Not IsObj($oINetworkListManager) Then Return 0 $INetworks = $oINetworkListManager.GetNetworks($NLM_ENUM_NETWORK) If Not IsObj($INetworks) Then Return 0 For $INetwork In $INetworks $ReDim = UBound($aNetworks, 1) + 1 ReDim $aNetworks[$ReDim][2] $aNetworks[$ReDim - 1][0] = $INetwork.GetName $aNetworks[$ReDim - 1][1] = $INetwork.isConnectedtoInternet Next $oINetworkListManager = 0 ;Free Return SetExtended($ReDim, $aNetworks) EndFunc ;==>GetNetWorks ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc Saludos
  8. Hi, anyone got some experience with the _NetInfo_GetUploadSpeed() from the NetInfo UDF. Been fiddeling with it for a day now. and i keep getting a return: 1 or return 2, never get my upload in kb/s. This is the little bit of my script i got: $s_CountryCode = "NL" $Upload_Speed = _NetInfo_GetUploadSpeed() MsgBox(4096, "Test", $Upload_Speed)What am I not seeing here...
  9. Hi, I am trying to create a script wich checks my hardware and my internet information. The hardware part is done and I got my external IP-check working but I have searched far and wide but not came up wich an example for an internet speed check. Can any one help me. Below you will find my script: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Inet.au3> #include <WinAPIReg.au3> #include <Security.au3> #include <WinAPI.au3> #include "NavInfo.au3" GUICreate("Mijn Salon - Check", 283, 311, -1, -1) GUICtrlCreateGroup("Systeem info", 8, 8, 265, 145) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $PROC = GUICtrlCreateInput("", 16, 32, 249, 21) $READPROC = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString") GUICtrlSetData($PROC, $READPROC) GUICtrlSetState($PROC, $GUI_DISABLE) $RAM = GUICtrlCreateInput("RAM", 16, 56, 121, 21) Local $aMem = MemGetStats() $mem = $aMem[1] /1024 $mem1= $mem /1024 $mem2= Round($mem1, 0) GUICtrlSetData($RAM, $mem2 & " GB Geheugen") GUICtrlSetState($RAM, $GUI_DISABLE) $MODEL = GUICtrlCreateInput("", 144, 56, 121, 21) $READMODEL1 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Bios", "SystemManufacturer") $READMODEL2 = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Bios", "BaseBoardProduct") GUICtrlSetData($MODEL, $READMODEL1 & " " & $READMODEL2) GUICtrlSetState($MODEL, $GUI_DISABLE) $WINDOWS = GUICtrlCreateInput("", 16, 80, 249, 21) $READOS = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName") If @OSArch = "X86" Then $ARCH = "32-Bit" Else $ARCH = "64-Bit" EndIf GUICtrlSetData($WINDOWS, $READOS & " " & $ARCH) GUICtrlSetState($WINDOWS, $GUI_DISABLE) $IE = GUICtrlCreateInput("", 16, 104, 249, 21) Local $sVersion = FileGetVersion(@ProgramFilesDir & "\Internet Explorer\iexplore.exe") GUICtrlSetData($IE, "Internet Explorer: " & $sVersion) GUICtrlSetState($IE, $GUI_DISABLE) $SILVERLIGHT = GUICtrlCreateInput("SILVERLIGHT", 16, 128, 249, 21) $Silverlight_Version = _NavInfo_GetSilverlightVersion() If Not @error Then GUICtrlSetData($SILVERLIGHT, "Silverlight: " & $Silverlight_Version) EndIf GUICtrlSetState($SILVERLIGHT, $GUI_DISABLE) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("Internet info", 8, 160, 265, 113) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $SPEED = GUICtrlCreateInput("SPEED", 16, 184, 249, 21) $IPADRES = GUICtrlCreateInput("", 16, 216, 249, 21) $PublicIP = _GetIP() GUICtrlSetData($IPADRES, $PublicIP) GUICtrlSetState($IPADRES, $GUI_DISABLE) $PROVIDER = GUICtrlCreateInput("PROVIDER", 16, 248, 249, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $SAVE = GUICtrlCreateButton("Opslaan naar .txt", 8, 280, 131, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $MAIL = GUICtrlCreateButton("Send E-mail", 144, 280, 131, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $SAVE SAVE() Case $MAIL MAIL() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func SAVE() $READIE = GUICtrlRead($IE) $IEDONE = StringTrimLeft($READIE, 19) $READSILVER = GUICtrlRead($SILVERLIGHT) $SILVERDONE = StringTrimLeft($READSILVER, 13) If FileExists(@Desktopdir & "\check.txt") Then FileDelete(@desktopdir & "\check.txt") EndIf $DEBITNR = InputBox("Invoeren", "Voer klantnaam in:", "") $MEDEWERKER = InputBox("Invoeren", "Uitgevoerd door:", "") $FILE = FileOpen(@desktopdir & "\check.txt", 1) $1 = GUICtrlRead($PROC) $2 = GUICtrlRead($RAM) $3 = GUICtrlRead($MODEL) $4 = GUICtrlRead($WINDOWS) $5 = $IEDONE $6 = $SILVERDONE $7 = GUICtrlRead($SPEED) $8 = GUICtrlRead($IPADRES) $9 = GUICtrlRead($PROVIDER) FileWrite($FILE, "Klantnaam: " & $DEBITNR & @CRLF) FileWrite($FILE, "Datum: " & @MDAY & "-" & @MON & "-" & @YEAR & @CRLF & @CRLF) FileWrite($FILE, "Processor: " & $1 & @CRLF) FileWrite($FILE, "Geheugen: " & $2 & @CRLF) FileWrite($FILE, "Model: " & $3 & @CRLF) FileWrite($FILE, "Windows: " & $4 & @CRLF) FileWrite($FILE, "Internet Explorer: " & $5 & @CRLF) FileWrite($FILE, "Silverlight: " & $6 & @CRLF & @CRLF) FileWrite($FILE, "Internet Snelheid: " & $7 & @CRLF) FileWrite($FILE, "IP-Adres: " & $8 & @CRLF) FileWrite($FILE, "Internet Provider: " & $9 & @CRLF & @CRLF) FileWrite($FILE, "Uitgevoerd door: " & $MEDEWERKER) MsgBox(4096, "Klaar", "Check is klaar en opgeslagen op het bureaublad") EndFunc Func MAIL() EndFunc
  10. Hello, I am trying to figure out how to have autoit automatically check a radio button on a external application I have tried the following without any success. Opt("WinTitleMatchMode", 1) while true $win = winwaitactive("Night Utilities Setup") if $win <> "" Then ; msgbox(0,"","found") endif ;ControlClick($win, "Sunday", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d:rbtnSunday]", "left", 1, 48, 13) ControlCommand($win, "Sunday", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d:rbtnSunday]", "Check") wendHere is the window info >>>> Window <<<< Title:    Night Utilities Setup Class:    WindowsForms10.Window.8.app.0.33c0d9d Position:    110, 103 Size:    790, 547 Style:    0x16CB0000 ExStyle:    0x00050180 Handle:    0x0012020C >>>> Control <<<< Class: WindowsForms10.BUTTON.app.0.33c0d9d Instance: 38 ClassnameNN: WindowsForms10.BUTTON.app.0.33c0d9d38 Name: rbtnSunday Advanced (Class): [NAME:rbtnSunday] ID: 1049020 Text: Sunday Position: 63, 119 Size: 104, 16 ControlClick Coords: 48, 13 Style: 0x5600000B ExStyle: 0x00000000 Handle: 0x001001BC >>>> Mouse <<<< Position: 114, 170 Cursor ID: 0 Color: 0x2B2F37 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &Run Now &Apply &Cancel &OK Programs To Run One Agency All Agencies Validate Cash Balances To Range All Clients Rename Codes Rebuild Sections 11:45:00 PM Saturday Use Customized Time For Batch Update From Files Delete All Files in AS_TEMP and AS_LOCK Batch Change Activity File Change Request Updates Real-Time Alerts IVANS Transmission Run Pseudo Post Prepare Company Reconciliations Validate Receivables Validate Client Balances Maintenance Options Dequeue Reports Database Maintenance Processing Mode Distributed Stand Alone File Selection FIM Only TAM Only All Files Maintenance Operations * You cannot scan with delete and pack Smaller Than Backup Data Files Before Pack Pack Data Files * Reindex Data Files Delete Unfixed Records * Fix Corrupt Records Print Scan Results Scan for Corrupt Records Day and Time 11:45:00 PM Sunday Saturday Friday Thursday Wednesday Tuesday Monday >>>> Hidden Text <<<< any help would be appreciated.
  11. Hi, i am trying to create a script that can check wich Windows version is installed on an offline Windows installation. Can anyone help me?
  12. Let start with some examples: 1. (As seen in another topic: '?do=embed' frameborder='0' data-embedContent>> ). Script copied from that topic Interrupt function can be any hotkey/event/adlib/callback. If-check inside interrupted function/script ; HotKeySet, or any function that can cause script interrupt HotKeySet("{Delete}", "RemoveSelectedControl") ;... Dim $InfoAboutControls[4096] Global $HandleForCurrentControl ;... While 1 $msg = GuiGetMsg() ;.... ;---Code to process moving a control (drag-n-drop)--- ; If check in MAIN LOOP (interruptible function). If $HandleForCurrentControl > 0 Then;Make sure we have a valid control handle ; ***** oops user pressed Delete key and we get pre-empted ; ***** user removed the selected control. ; ***** Returning from the RemoveSelectedControl function and resuming here: GuiCtrlSetPos($InfoAboutControls[$HandleForCurrentControl], $newLeftPosition, $newTopPosition) EndIf WEnd Func RemoveSelectedControl() $HandleForCurrentControl = -1 EndFunc 2. If-check inside interrupt function Hotkey only. Flag is set right after if check. It's possible or not this function print twice or more? HotKeySet("{Delete}", "_TestHotkey") Func _TestHotkey() Static $bFlag = True If ($bFlag) Then ; ***** Right here, user pressed Delete key ; ***** bFlag is currently not set ; ***** And the script will execute this function twice or more times, instead of just once $bFlag = False ConsoleWrite("This should be printed only ONCE") EndIf EndFunc 3. Same as 2, but with global flag The question is: can I rely on if-checking with a flag, to ensure that my script doesn't do any strange things, as describe in the above examples?
  13. TinyLinksChecker v1.0.1.1 May be you know xenu, a free and powerfull soft used for find broken links on web sites. Mine is more slower and don't check recursively. WinHttp.au3 needed. source : TinyLinksChecker v1.0.1.1.au3 executable : TinyLinksChecker.exe.html (Once this html file downloaded, double click on it for start the download) Hope it can help you ! If someone know how to create a recursive links search function ( with adjustable recursive level ) please contact me !
  14. Hi, I'm looking for a way to check if the process has been suspended (NOT if it's currently suspended with IsHungAppWindow) with the NtProcessSuspend function. Note that it's for the process itself. NB : If have added a timer in my while but it's not efficient if the cpu is overloaded which would increase the timer. (so I'm looking for a real solution) Thanks for anyhelp. Br, FireFox.
  15. Hi everybody, To give you an idea, take a look at this simple example of a message box using DllCall function. $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0) The question is how to check if DllCall will work before the message box appear? Thanks & any help would be greatly appreciated..
  16. Hey guys, I know that you can check to see whether a variable has been declared by using the function IsDeclared. Is there a similar function that can tell me whether a function exists? Thanks.
  17. Hey, I am just wondering about how I would check whether the current GUI is maximized or restored? Right now, I am using GUI Events to change a variable, I am wondering whether there is a more efficient way? Thanks.
×
×
  • Create New...