Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/2016 in all areas

  1. Hello! I have been busy with establishing the IRC Community for AutoIt... I thought that ##AutoIt needs a bot with lot of neat features, I made a simple one using @rcmaehl's UDF but it lacked many features which I wanted so I made a new UDF for myself lol. Features: Lightweight & Simple. Native support for logging. Full compliance with RFC 2812 and IRCv3.1. Fully tested. Ability to parse server messages. Open source and Unlicenced. Coded with Best Coding Practices in mind. Support for major IRC networks. SASL Authentication Supported! ..etc. Planned Features: Support for DCC and Direct P2P file transfer Colors More functions for Atheme services (NickServ, ChanServ etc.) ...etc. Download GitHub https://github.com/TheDcoder/IRC-UDF-for-AutoIt Enjoy! TD P.S I am newbie at GitHub so the repo might look weird
    1 point
  2. Hello. As LarsJ says funtions are not implemented properly. So I wrote this example with correct implementation. (tested in windows 10 x64. Compiled as x86 and x64) Global Const $sTagSERVICE_STATUS = "DWORD dwServiceType;" & _ "DWORD dwCurrentState;" & _ "DWORD dwControlsAccepted;" & _ "DWORD dwWin32ExitCode;" & _ "DWORD dwServiceSpecificExitCode;" & _ "DWORD dwCheckPoint;" & _ "DWORD dwWaitHint;" Global $STANDARD_RIGHTS_REQUIRED = 0x000F0000 Global $SC_MANAGER_CONNECT = 0x0001 Global $SC_MANAGER_CREATE_SERVICE = 0x0002 Global $SC_MANAGER_ENUMERATE_SERVICE = 0x0004 Global $SC_MANAGER_LOCK = 0x0008 Global $SC_MANAGER_QUERY_LOCK_STATUS = 0x0010 Global $SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020 Global $SC_MANAGER_ALL_ACCESS = BitOR($STANDARD_RIGHTS_REQUIRED, _ $SC_MANAGER_CONNECT, _ $SC_MANAGER_CREATE_SERVICE, _ $SC_MANAGER_ENUMERATE_SERVICE, _ $SC_MANAGER_LOCK, _ $SC_MANAGER_QUERY_LOCK_STATUS, _ $SC_MANAGER_MODIFY_BOOT_CONFIG) Global Const $hAdvapi32 = DllOpen("advapi32.dll") MsgBox(64, "Info", "Make sure youre running Admin") Local $aRet = 0 Local $sServiceName = "Spooler" $aRet = DllCall($hAdvapi32, "handle", "OpenSCManagerW", _ "wstr", Null, _ "wstr", Null, _ "dword", $SC_MANAGER_ALL_ACCESS) If $aRet[0] = 0 Then If $aRet[0] = 0 And Not @error Then ConsoleWrite("!Error in OpenSCManager" & @CRLF) Exit EndIf Local $hSCManager = $aRet[0] ;~ MsgBox(0, "", $hSCManager) ConsoleWrite(">$hSCManager: " & $hSCManager & @CRLF) $aRet = DllCall($hAdvapi32, "handle", "OpenServiceW", _ "handle",$hSCManager, _ "wstr", $sServiceName, _ "long", $SC_MANAGER_ALL_ACCESS) If $aRet[0] = 0 Then If $aRet[0] = 0 And Not @error Then ConsoleWrite("!Error in OpenServiceW" & @CRLF) Exit EndIf Local $hServ = $aRet[0] ;~ MsgBox(0, "", $hServ) ConsoleWrite(">$hSCManager: " & $hServ & @CRLF) Local $tStatus = DllStructCreate($sTagSERVICE_STATUS) $aRet = DllCall($hAdvapi32, "bool", "QueryServiceStatus", _ "handle", $hServ, _ "ptr", DllStructGetPtr($tStatus)) If $aRet[0] = 0 Then If $aRet[0] = 0 And Not @error Then ConsoleWrite("!Error in QueryServiceStatus" & @CRLF) Exit EndIf ConsoleWrite("+Spooler Status: " & $tStatus.dwCurrentState & @CRLF) MsgBox(0, "", "Spooler Status: " & $tStatus.dwCurrentState) DllCall($hAdvapi32, "bool", "CloseServiceHandle", "handle", $hServ) DllCall($hAdvapi32, "bool", "CloseServiceHandle", "handle", $hSCManager) DllClose($hAdvapi32) Saludos
    1 point
  3. Jfish

    Incremental copy paste

    Okay, now I think I understand ... how about this (selects cell in question): ;Find the very last used cell in a Row: $rowNum=3; this is the row number you are targeting to find the last used cell With $oWorkbook.ActiveSheet $LastUsedCellInRow = .Range("IV"&$rowNum).End($xlToLeft).Select EndWith This one returns the specific address: ;Find the very last used cell in a Row: $rowNum=3; this is the row number you are targeting to find the last used cell With $oWorkbook.ActiveSheet $LastUsedCellInRow = .Range("IV"&$rowNum).End($xlToLeft).Address EndWith MsgBox("","",$LastUsedCellInRow)
    1 point
  4. Something like this? I have also changed you logic a little to ensure your gui remains responsive and the Func Test() is called by an adlib. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 615, 438, 192, 124) Global $Label1 = GUICtrlCreateLabel("Terminal 1 Output:", 40, 24, 91, 17) Global $Edit1 = GUICtrlCreateEdit("", 40, 48, 553, 377) GUICtrlSetData(-1, "") Global $Button1 = GUICtrlCreateButton("START", 256, 16, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ; enable updating Edit control AdlibRegister("Test",60 * 60 * 1000) EndSwitch WEnd Func Test() ;MsgBox(0, "Result", $data) $data = GUICtrlRead($Edit1) & @CRLF ; append new data to current data $data &= FileRead("C:\Reports\pcname.txt") GUICtrlSetData($Edit1, $data & @CRLF) FileDelete("C:\Reports\pcnames.txt") EndFunc ;==>Test Jos
    1 point
  5. JohnOne

    Keyboard training for kids

    Just make the app topmost, full screen, and always on top, as well as keep checking it is that.
    1 point
  6. @TheDcoder: I don't do chat, but I do admire your zest, vigour, and vim. BTW, what is "persmission"? (perhaps change that thread title after all?) EDIT: wait, was I chatting just now?!
    1 point
  7. This example matches the first two occurrences of "85C0741A68??????1068??????1068??????108BC8E8", then, only on the third occurrence, replaces "85C0741A68" in "85C0741A68??????1068??????1068??????108BC8E8" with "85C0EB1A68". You should be able to figure out the RE pattern by studying the StringRegExp and StringRegExpReplace functions in the Autoit help file. #include<array.au3> $data = "abc85C0741A68??????1068??????1068??????108BC8E8w " & _ "def85C0741A68??????1068??????1068??????108BC8E8x " & _ "gfi85C0741A68??????1068??????1068??????108BC8E8y " & _ "jkl85C0741A68??????1068??????1068??????108BC8E8z " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " & _ "85C0741A68??????1068??????1068??????108BC8E8 " ;$p = StringRegExpReplace($data, "^.*?(85C0741A68.{6}1068.{6}1068.{6}108BC8E8.*?85C0741A68.{6}1068.{6}1068.{6}108BC8E8.*?)(85C0741A68)(.{6}1068.{6}1068.{6}108BC8E8)", "${1}85C0EB1A68${3}") ; Or Local $iReplaceOccurrenceNumber = 3 $p = StringRegExpReplace($data, "^(.*?(?:85C0741A68.{6}1068.{6}1068.{6}108BC8E8.*?){" & $iReplaceOccurrenceNumber - 1 & "})(85C0741A68)(.{6}1068.{6}1068.{6}108BC8E8)", "${1}85C0EB1A68${3}") ConsoleWrite($p & @LF)
    1 point
  8. May be this article will give you more information. http://www.techrepublic.com/forums/questions/it-seems-our-sql-database-is-corrupted/
    1 point
  9. If you have no reliable backups, I would create a new database and start copying tables and any other objects as fast as you can, before it dies permanently. If the data is inaccessible then can try the tool SQL Server Recovery Toolbox. It is possible you will be able to help. http://www.oemailrecovery.com/sql_repair.html Also try this. This probably won't work, but it forces the suspect flag off. You will first need to turn on update for systables. So run his USE Master Go EXEC sp_configure 'allow updates' , 1 Go Reconfigure Go Then run the following code: update sysdatabases set status = status & ~256 where name = 'MySuspectDatabase' If that doesn't fix it. You will want to start copying all the objects to a new db as ACPerkins has suggested. You will want to place the db in emergency mode. First so run this: update sysdatabases set status = status | -32768 where name = 'MioSuspectDatabase' Then use dts, Select into's and whatever else to get the objects from the suspect DB to a new one. Dont forget to undo the allow updates option: EXEC sp_configure 'allow updates' , 1 Go Reconfigure Go
    1 point
  10. Hey Guys, Just wanted to share a snippet I made in case anyone can use it. I needed to list of all User ID's and their respective display names for an MLIST, searched recursively. The recursive function in he UDF returns either only the FQDN or SAM-ID. It also will do a query against all the returned user IDs for if they have any members, and returns group names in the result. It returns 54 members, (4 groups to query). I modified it to return the ID in the first column and the displayname in the second, omitted returning group names, and only querying for members if the ID is a GROUP_OBJECT. (The last part cut the runtime in half, 1.5 to 0.8 seconds, which on a network laggy day could be a much bigger difference as it went from 58 queries to 4.) My use case for this is that I need the IDs to write to a Sharepoint list but need the names so users can select a person via the name in the GUI. ; #FUNCTION# ==================================================================================================================== ; Name...........: _AD_RecursiveGetGroupMembers ; Description ...: Takes a group and recursively returns a list of groups and members of the group. ; Syntax.........: _AD_RecursiveGetGroupMembers($sGroup[, $iDepth = 10[, $bListInherited = True[, $bFQDN = True]]]) ; Parameters ....: $sGroup - Group for which the members should to be returned. Can be specified as Fully Qualified Domain Name (FQDN) or sAMAccountName ; $iDepth - Optional: Maximum depth of recursion (default = 10) ; $bListInherited - Optional: Defines if the function returns the group it is a member of (default = True) ; $bFQDN - Optional: Specifies the attribute to be returned. True = distinguishedName (FQDN), False = SamAccountName (default = True) ; Return values .: Success - Returns an one-based one dimensional array of group or member names (FQDN or sAMAccountName) ; Failure - "", sets @error to: ; |1 - Specified group does not exist ; Author ........: Jonathan Clelland ; Modified.......: water ; Remarks .......: This function traverses the groups in the specified group until the maximum depth is reached. ; if $bListInherited = True the return is the FQDN or sAMAccountname of the group or member and the FQDN(s) or sAMAccountname(s) of the group it ; is a member of, seperated by '|'(s) if flag $bListInherited is set to True. ;+ ; If flag $bListInherited is set to False then the group/member names are sorted and only unique entries are returned. ; Related .......: _AD_GetGroupMembers ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _AD_RecursiveGetGroupMembers($sGroup, $iDepth = 10, $bListInherited = True, $bFQDN = True) If _AD_ObjectExists($sGroup) = 0 Then Return SetError(1, 0, "") If StringMid($sGroup, 3, 1) <> "=" Then $sGroup = _AD_SamAccountNameToFQDN($sGroup) Local $iCount1, $iCount2 Local $sField = "distinguishedName" If Not $bFQDN Then $sField = "samaccountname" $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(memberof=" & $sGroup & ");" & $sField & ";subtree" Local $oRecordSet = $__oAD_Command.Execute Local $aMembers[$oRecordSet.RecordCount + 1] = [0] If $oRecordSet.RecordCount = 0 Then Return $aMembers $oRecordSet.MoveFirst $iCount1 = 1 Local $aTempMembers[1] Do $aMembers[$iCount1] = $oRecordSet.Fields(0).Value If $iDepth > 0 Then $aTempMembers = _AD_RecursiveGetGroupMembers($aMembers[$iCount1], $iDepth - 1, $bListInherited, $bFQDN) If $bListInherited Then For $iCount2 = 1 To $aTempMembers[0] $aTempMembers[$iCount2] &= "|" & $aMembers[$iCount1] Next EndIf _ArrayDelete($aTempMembers, 0) _ArrayConcatenate($aMembers, $aTempMembers) EndIf $iCount1 += 1 $oRecordSet.MoveNext Until $oRecordSet.EOF $oRecordSet.Close If $bListInherited = False Then _ArraySort($aMembers, 0, 1) $aMembers = _ArrayUnique($aMembers, 0, 1) EndIf $aMembers[0] = UBound($aMembers) - 1 Return $aMembers EndFunc ;==>_AD_RecursiveGetGroupMembers ;MODIFIED FUNCTION ABOVE TO INCLUDE DISPLAY NAME IN A SECOND COLUMN Func _AD_RecursiveGetGroupMembersDN($sGroup, $iDepth = 10) If _AD_ObjectExists($sGroup) = 0 Then Return SetError(1, 0, "") If StringMid($sGroup, 3, 1) <> "=" Then $sGroup = _AD_SamAccountNameToFQDN($sGroup) Local $iCount1, $iCount2 Local $sField = "samaccountname,displayname,sAMAccountType" $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(memberof=" & $sGroup & ");" & $sField & ";subtree" Local $oRecordSet = $__oAD_Command.Execute Local $aMembers[$oRecordSet.RecordCount + 1][2] $aMembers[0][0] = 0 If $oRecordSet.RecordCount = 0 Then Return $aMembers $oRecordSet.MoveFirst $iCount1 = 1 Local $aTempMembers[1] Do $aMembers[$iCount1][0] = $oRecordSet.Fields(0).Value $aMembers[$iCount1][1] = $oRecordSet.Fields(1).Value If $oRecordSet.Fields(2).Value = 268435456 Then If $iDepth > 0 Then $aTempMembers = _AD_RecursiveGetGroupMembersDN($aMembers[$iCount1][0], $iDepth - 1) _ArrayDelete($aTempMembers, 0) _ArrayDelete($aMembers, $iCount1) _ArrayConcatenate($aMembers, $aTempMembers) EndIf Else $iCount1 += 1 EndIf $oRecordSet.MoveNext Until $oRecordSet.EOF $oRecordSet.Close _ArraySort($aMembers, 0, 1) $aMembers[0][0] = UBound($aMembers) - 1 Return $aMembers EndFunc ;==>_AD_RecursiveGetGroupMembersDN
    1 point
  11. iamtheky

    NetStat To Names

    Netstat -f is slow as balls so I wrote this 3 parter to add to my AuditShot which runs substantially quicker in my testing. 1) runs netstat -n, 2) uniques the foreign addresses 3) runs those through nslookup As always, improvements and/or berating inefficiencies are both welcome: *Fixed IPv6 fail ;netstat -f replacement v2 (potential IPv6 fix) #include<array.au3> $sCommand = "netstat -n" $iPID = run($sCommand, "" , @SW_HIDE , $stdout_child) $sOutput = "" $sNSLookupOut = "" local $aNSfinal[0] local $aNSLookupFinal[0] While 1 $sOutput &= StdoutRead($iPID) If @error Then ExitLoop WEnd ProcessClose($iPID) $aOut = stringsplit($sOutput , @LF , 2) For $i = 4 to ubound($aOut) - 1 $aLine = stringsplit($aOut[$i] , " " , 2) For $k = ubound($aLine) - 1 to 0 step - 1 If stringstripWS($aLine[$k] , 8) = "" Then _ArrayDelete($aLine , $k) Next ;~ msgbox(0, '' , stringleft($aLine[2] , stringinstr($aLine[2] , ":" , 0 , -1) - 1)) If ubound($aLine) > 1 Then _ArrayAdd($aNSfinal , stringleft($aLine[2] , stringinstr($aLine[2] , ":" , 0 , -1) - 1)) $aUniqueNS = _ArrayUnique($aNSfinal) _ArrayDelete($aUniqueNS , 0) Next ;_ArrayDisplay($aUniqueNS) For $k = 0 to ubound($aUniqueNS) - 1 $iPID = run("nslookup " & $aUniqueNS[$k] , "" , @SW_HIDE , $stdout_child) While 1 $sNSLookupOut &= StdoutRead($iPID) If @error Then ExitLoop WEnd ProcessClose($iPID) $aNSLookup = stringsplit($sNSLookupOut , @LF , 2) _ArrayDelete($aNSLookup , "0-2") _ArrayAdd($aNSLookupFinal , $aNSLookup) $sNSLookupOut = "" Next _ArrayDisplay($aNSLookupFinal , "Final")
    1 point
  12. If your database does not contain nasty files then you need to do 1 of 2 things. 1. change whatever software is flagging database. 2. Get in touch with software developers to resolve it.
    1 point
  13. Try this. Local $String = "123123123456123" & @CRLF & _ ; "123abc123456123" "a123bb456ccc789123567456321" ; "aabcbb456ccc789abc567456321" ConsoleWrite(StringRegExpReplace($String, "(123)(.{1,5}456)", "abc$2") & @LF) ; Characters between "123" and "456" - minimum one, maximum five. #cs ; Returns:- 123abc123456123 aabcbb456ccc789abc567456321 Note: If R.E. pattern were "(123)(.{1,6}456)", then the first test string would return "abc123123456123" because there are six characters between "123" and "456". #ce
    1 point
  14. Today I had to reboot my PC, due to something I did not see in time, again. So I wrote a, for emergencies, close all scripts, script. Not much code wise but handy to have compiled and running at PC's startup. Just in case... . If Not @Compiled Then Opt("MustDeclareVars", 1) ; this script is meant to run compiled, as Admin if possible. Global $sSelfHiddenTitle = "~~~" & StringTrimRight(@ScriptName, 4) & "~~~" If WinExists($sSelfHiddenTitle) Then HotKeyPressed() MsgBox(262144 + 64, "Emergency Close ALL Autoit processes for user " & @UserName, 'press "Ctrl - Alt - Shift - PAUSE" to execute emergency ProcessClose', 15) Exit 2 EndIf AutoItWinSetTitle($sSelfHiddenTitle & @AutoItPID & "~~~") HotKeySet("!+^{PAUSE}", "HotKeyPressed") ; Alt-Ctrl-Shift-Pause Opt("TrayMenuMode", 3) Global $idCloseEmAll = TrayCreateItem("-= Emergency close all AU3s (Shift-Ctrl-Alt-Pause or DoubleClick tray icon) =-") TrayCreateItem("") ; Create a separator line. Global $idProcessCloseAllAutoit3 = TrayCreateItem('ProcessClose( all "Autoit3 Process" ) - for au3''s') TrayCreateItem("") Global $idCloseAllHiddenWin = TrayCreateItem('WinClose( all "AutoIt v3" hidden windows ) - for compiled or not') TrayCreateItem("") Global $idKillAllWin_CLASS_AutoItv3 = TrayCreateItem('WinKill( all "CLASS:AutoIt v3" ) - KILL''EM ALL !') ; TrayCreateItem("") Global $idBrowseFolderSelf = TrayCreateItem("Browse self folder") TrayCreateItem("") Global $idExit = TrayCreateItem("Exit") TrayCreateItem("") Global $idCancel = TrayCreateItem("Cancel") TraySetState(1) ; Show the tray menu. TraySetClick(16) ; 16 = Releasing secondary mouse button TraySetToolTip("Emergency close ALL AutoIt's" & @CR & "by DoubleClick or Shift-Ctrl-Alt-Pause" & @CR & "RightClick for menu" & @CR & @CR & @CR & " ") Global Const $TRAY_EVENT_PRIMARYDOUBLE = -13 main() Func main() While 1 Switch TrayGetMsg() Case $idCloseEmAll, $TRAY_EVENT_PRIMARYDOUBLE ; If HotKeyPressed() = 0 Then While f_CloseAllHiddenWin() Sleep(2000) WEnd ToolTip('Done with "AutoIt v3"', 50, 50, "Emergency close !", 1) Sleep(2000) ToolTip("") EndIf Case $idProcessCloseAllAutoit3 HotKeyPressed() Case $idCloseAllHiddenWin While f_CloseAllHiddenWin() Sleep(2000) WEnd ToolTip('Done with "AutoIt v3"', 50, 50, "Emergency close !", 1) Sleep(2000) ToolTip("") Case $idKillAllWin_CLASS_AutoItv3 While f_idKillAllWin_CLASS_AutoItv3() Sleep(2000) WEnd ToolTip('Done with "CLASS:AutoIt v3"', 50, 50, "Emergency close !", 1) Sleep(2000) ToolTip("") Case $idExit Return Case $idBrowseFolderSelf ShellExecute(@ScriptDir) EndSwitch WEnd EndFunc ;==>main Func HotKeyPressed() Local $i = 0 ToolTip("ProcessClose: AutoIt3 # " & $i, 50, 50, "Emergency close !", 1) Do While ProcessExists("Autoit3.exe") $i += 1 ToolTip("ProcessClose: AutoIt3.exe # " & $i, 50, 50, "Emergency close !", 1) ProcessClose("AutoIt3.exe") WEnd While ProcessExists("AutoIt3_x64.exe") $i += 1 ToolTip("ProcessClose: AutoIt3_x64.exe # " & $i, 50, 50, "Emergency close !", 1) ProcessClose("AutoIt3_x64.exe") WEnd Sleep(2000) Until (Not ProcessExists("AutoIt3.exe") And Not ProcessExists("AutoIt3_x64.exe")) ToolTip("") Return $i EndFunc ;==>HotKeyPressed Func f_idKillAllWin_CLASS_AutoItv3() Local $n, $i = 0, $aWinList = WinList("[CLASS:AutoIt v3]") ToolTip(' WinKill: ' & UBound($aWinList) - 1 & ' "CLASS:AutoIt v3" ', 50, 50, "Emergency close !", 1) For $n = 1 To UBound($aWinList) - 1 If StringInStr($aWinList[$n][0], $sSelfHiddenTitle) Then ContinueLoop WinKill($aWinList[$n][1]) $i += 1 Next Return $i EndFunc ;==>f_idKillAllWin_CLASS_AutoItv3 Func f_CloseAllHiddenWin() Local $n, $i = 0, $aWinList = WinList("AutoIt v3") ToolTip(' WinClose: ' & UBound($aWinList) - 1 & ' "AutoIt v3" ', 50, 50, "Emergency close !", 1) For $n = 1 To UBound($aWinList) - 1 WinClose($aWinList[$n][1]) $i += 1 Next Return $i EndFunc ;==>f_CloseAllHiddenWin It eventually happens, so if it ever does, you're ready. Edit (2017.01.27): Added, in case of "is compiled, better close all AutoIt v3 hidden windows" and "OMG, kill all [CLASS:AutoIt v3] windows". Also added double click the tray icon to execute.
    1 point
  15. This is functional, but will be getting work done to it all next week. Anybody who wants to participate in improvements is welcome, I would be much obliged if you would do so with code rather than conjecture. #include <array.au3> #include <File.au3> #include <Crypt.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Security.au3> Global Const $CALG_SHA_256 = 0x0000800c $hGUI = GUICreate("SHA256 Hunter" , 420 , 240) ; will create a dialog box that when displayed is centered Local $hCompName = GUICtrlCreateInput(" Computer Name or IP Address", 1, 5, 190, 20) Local $idRadio1 = GUICtrlCreateRadio("File", 10, 45, 100, 20) $hFilename = GUICtrlCreateInput("filename (or partial)" , 10 , 65 , 190 , 20) $hPath = GUICtrlCreateInput("\c$\Users\" & @UserName & "\Desktop" , 10 , 90 , 190 , 20) $hSHA2 = GUICtrlCreateInput("SHA256" , 10 , 115 , 190 , 20) Local $idButtonGO = GUICtrlCreateButton("GO", 275, 202, 60, 20) GUISetState(@SW_SHOW) Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE ExitLoop Case $idMsg = $idButtonGO AND $idRadio1 And BitAND(GUICtrlRead($idRadio1), $GUI_CHECKED) = $GUI_CHECKED $inputfile = GUICtrlRead($hFilename) $inputpath = GUICtrlRead($hPath) $inputSHA2 = GUICtrlRead($hSHA2) $inputCompName = GUICtrlRead($hCompName) If $inputCompName = " Computer Name or IP Address" OR $inputCompName = "" Then $inputCompName = "localhost" If asc($inputpath) = 0 OR $inputpath = "Path" Then $inputpath = "" If asc($inputfile) = 0 OR $inputfile = "filename (or partial)" Then $inputfile = "" If asc($inputSHA2) = 0 OR $inputSHA2 = "SHA256" Then $inputSHA2 = "" _FilePlusSHA256($inputCompName, $inputfile , $inputpath , $inputSHA2 ) exitloop EndSelect WEnd Func _FilePlusSHA256($strComputer, $Filename , $Path , $SHA256target) tooltip("Working...") If $Path = "" then $Path="\c$\" $aFiles = _FileListToArrayRec("\\" & $strComputer & $Path , "*" , 1, 1, 0, 2) If $inputfile <> "" Then $aFound = _ArrayFindAll($aFiles , $Filename , 0 , 0 , 0 , 1) Else $aFound = $aFiles Endif If isArray($aFound) Then for $j = 1 to ubound($aFound) - 1 $fHash = _Crypt_HashFile($aFound[$j] , $CALG_SHA_256) consolewrite($aFound[$j] & @LF & $fhash & @LF) If $fHash = $inputSHA2 Then msgbox(0, 'FOUND' , $aFound[$j] & @LF & $fhash) Exit EndIf next Endif EndFunc
    1 point
  16. Hello AutoIT scripters. I have been working on this form filler for close to 4-5 months now (in between school and full time job is hard ). But I think it is finally to the quality where I feel comfortable pushing it out. To sum it up, it is a script which I started writing back when I was looking for a job to help with the tedious process of filling out online job applications as well as standard online info for logging into accounts. I have found that using standard form fillers are not always accurate since they rely on the html tags to input data, and sometimes those tags are not correct, thus the form filler skips over it or inputs the incorrect data value. This script allows users to input their information, encrypts it using AES before writing it to a file, and decrypts the value read from the file (so the only place actual data is not encrypted is within the program GUI). You select all data you need to input into a given form, send it all to the "input" GUI and listview, then use one of the two methods to input the data: when click "start", the selected listview item will "send" itself to the input when you click the mouse and the mouse cursor is displayed as I-beam, or click clipboard and data value is copied to clipboard, separate application is launched which, in the event the context menu is disabled, allows you to perform multiple clipboard operations with the mouse (double-click right mouse performs paste, hold down right mouse performs copy, etc). This might seem like a very simplistic script to some, as there is still much I don't know about coding/programming in general. So have at it and give me some feedback. Would love to hear what you think: Zip containing all relevant files
    1 point
  17. Honestly, I probably don't know any more than you. I stopped when I reached the limit of what this code generator can do because that was all I've needed so far. If the code generator can't solve it and it's not covered on pages 1 to 8 of the linked PDF, I probably can't do it either. Good luck, though!
    1 point
  18. During my free time I will try and pick up development of this again. First off my priority is to refactor a lot of the code, as my style has changed quite a bit when I started this back in 2011. Though I will try to maintain the functionality that is present, no doubt things will be broken. Don't expect anything until September though.
    1 point
  19. LightsOn

    Windows VPN

    Hi All, Been using Auto-it for some time now for small little things - mainly in an HA environment to aid in basic automated tasks. Thank you for the great forum and code etc. I have a new challenge however that I am stumped with - I researched all yesterday and could not find a solution - hope the community can help. I want to receive a notification of a VPN connection. The VPN is on a standard windows 7 machine. it can only revive one connection at a time. I am not fussed about knowing who is connected just that there is a connection or not. Rasdial in cmd works on the host indicating a connection to the client but the client does not see a connection from the host if the same resdial cmd is posted client side. I think I could also check if ports are in use / active or not - but not sure how to do this. I tired using window info to see if the network icon that shows either a connection or not had a change in information shown but it does not. I want to do the monitoring on the host not on the clients. I was hoping that using one of the above I could crudely set a task schedule to run and check every 1 minute or similar against either rasdial result, or window info, or port data, and as such do something on a result. but so far no joy in finding a solution that works. any ideas? Thank you in advance.
    1 point
×
×
  • Create New...