Jump to content

walle

Active Members
  • Posts

    227
  • Joined

  • Last visited

Everything posted by walle

  1. Add this line and check if it made any difference #RequireAdmin
  2. Add #RequireAdmin "This function was primarily aimed at allowing AutoIt scripts to work correctly with Windows Vista User Account Control (UAC) (However, will also work on Windows 2000 and Windows XP)."
  3. Thank you!
  4. Can someone help me to adapt this dllcall to the latest version of autoit. Thanks http://msdn.microsoft.com/en-us/library/ms710815(VS.85).aspx Func mciSendString($s) DllCall("winmm.dll", "int", "mciSendString", "str", $s, "str", "", "int", 65534, "hwnd", 0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc
  5. Thank you SpookMeister Really grateful.
  6. Well, sort off. I was looking for the command "netstat -ano" Found it just after having created this thread. Thanks anway! So, I got the pid but I still have some difficulties to collect the assoicated ip. I want to, based on the pid, collect the associated ip. Sounds easy? Well, I have never been good at collecting info from dos. This is what i got so far. Lets say I want the ip for pid 2260. How should I proceed? #include <Constants.au3> $list = ProcessList("Software.exe") for $i = 1 to $list[0][0] $pid = $list[$i][1] next Local $foo = Run("netstat -ano", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sStdOutRead = "" While 1 $sStdOutRead &= StdoutRead($foo) if not $sStdOutRead = "" then ExitLoop Wend Active Connections Proto Local Address Foreign Address State PID TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1216 TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING 1488 TCP 127.0.0.1:1029 0.0.0.0:0 LISTENING 2260 TCP 127.0.0.1:5152 0.0.0.0:0 LISTENING 1596 TCP 127.0.0.1:5152 127.0.0.1:2271 CLOSE_WAIT 1596 TCP 192.168.1.5:139 0.0.0.0:0 LISTENING 4
  7. I'm looking for a way to list or log all IP network connections (indexed by IP address or hostname) and the associated local process (and possibly other information). How should I proceed? Edit: netstat -ano ...
  8. Edit: Too slow
  9. Maybe this can get you started. Another, easier way to check if a torrent has finished downloading is by using Utorrents "launch application when torrent has finished" and then search for that particelar process. WinWait("[REGEXPTITLE:Torrent.\d+.*$]") WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_SHOWNORMAL) Do $GetWST = WinGetState("[REGEXPTITLE:Torrent.\d+.*$]") If $GetWST = BitAND(21,23) Then WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_SHOWNORMAL) WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_HIDE) EndIf $title = "[REGEXPTITLE:Torrent.\d+.*$]" $listcontrol = "[CLASSNN:SysListView322]" $hWnd = ControlGetHandle( $title, "", $listcontrol ) $header_hWnd = _GUICtrlListView_GetHeader($hWnd) $Torrentname = "" $FindTN = _GUICtrlListView_FindInText($HWND, $Torrentname) $TEST = _GUICtrlListView_GetItemText($HWND, $FindTN) $ccount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView322", "GetSubItemCount") $icount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView322", "GetItemCount") Dim $listarray[$ccount][$icount+1] For $c = 0 To $ccount-1 $listarray[$c][0] = _GUICtrlListView_GetItemText($header_hWnd, $c) $Countmore = $icount - $FindTN For $i = $FindTN To $icount-$Countmore $itemtext = _GUICtrlListView_GetItemText($hWnd, $i, $c) $listarray[$c][$i+1] = $itemtext Next Next For $c = 0 To $ccount-1 ;ConsoleWrite($listarray[$c][0]) For $i = 0 To $icount-1 ;ConsoleWrite($listarray[$c][$i+1]) Next ;ConsoleWrite("|") Next
  10. Correct Edit: Installed software. List of installed software 'The script writes all installed software on the computer. Wscript.Echo "Software installed on this machine :" Wscript.Echo "************************************" Set S = CreateObject("RegEdit.Server") For Each Key In S.Keys("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall").SubKeys If Key.ExistsValue("DisplayName") Then Wscript.Echo Key.Values("DisplayName").Value Else Wscript.Echo "(" & Key.Name & ")" End If Next
  11. ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window") title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. string String of characters to send to the control. flag [optional] Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow. flag = 1, keys are sent raw.
  12. Might be a little bug. The red slime can't move backwards while jumping or jump while moving backwards. Uhm, appears randomly. Great game!
  13. Okey, get the right form, and use _IEFormSubmit. Hopefully Dale, the king of IE, or someone ells with a little more experience can help you. I have not touched Autoit for over a year now. So, I'm a bit rusty $oForm = _IEFormGetCollection($oIE, 0) _IEFormSubmit ($oForm)
  14. I'm surprised how quickly I forget things.... Anyway, increase the number until you find the right form, as temporary solution. Form 1 $oForm = _IEFormGetCollection($oIE, 1)
  15. Download latest service pack from microsoft. Found on Google: Using Registry Key Go to Start—>Run type regedit click ok Expand and navigate to the following registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\DWN On the right pane, locate ColorizationColor with type as DWORD. Right click on ColorizationColor, and select Delete on the right click menu. Click on OK to confirm the deletion. Then right click on registry value titled Composition (type DWORD) and select Modify. Change the value to 0 (by default is 1).
  16. Good work!
  17. Take a look http://www.autoitscript.com/forum/index.ph...%20hex&st=0 Quote: Glad you liked it, i convert the picture data to binary code using a hex editor and than i call this line CODEFileWrite(@TempDir & "\chip.jpg", Binary($pic)) to create the picture. Take a look in the beginning of the script at local $pic. I'm declaring the binary code there, it may look a little complicated but it's simillair to FileInstall. Check the help file for more info. as for the first problem i have spended only 10 minutes to convert and create the script since i'm not a Dll guru so errors might occur. Convert picture: $file = FileOpenDialog('Open the image file', @ScriptDir, 'image (*.jpg;*.bmp;*gif;*.png)', 1) $file2 = FileSaveDialog('Save the file', @ScriptDir, 'script (*.au3)') _CheckExt($file2, 'au3') $var = InputBox('Name variable', 'Prompt the name variable used', '$pic') _CheckCapital($var, '$') $hfile = FileOpen($file, 16) $hfile2 = FileOpen($file2, 2) FileWrite($hfile2, $var&'="0x"' & @CRLF) While 1 $data = FileRead($hfile, 30) If @error Then ExitLoop FileWrite($hfile2, $var&'&="' & StringTrimLeft($data,2) & '"' & @CRLF) WEnd MsgBox(0, 'Done!!', 'Done by Fabry!!!') Func _CheckExt(ByRef $s_file, $s_ext) If StringRight($s_file, StringLen($s_ext)) <> $s_ext Then $s_file &= '.' & $s_ext EndFunc ;==>_CheckExt Func _CheckCapital(ByRef $s_file, $s_cap) If StringLeft($s_file, StringLen($s_cap)) <> $s_cap Then $s_file = $s_cap & $s_file EndFunc ;==>_CheckExt
  18. looking forward to a new release muttley
  19. Ah, my bad, wrote wrong. But, the problem still remains. Local $iPID = Run("C:\Documents and Settings\DIR\My Documents\Burnbuddy\unrar.exe" & " vb " & "E:\DVDR\DIR\sub-rtcrp.rar", "", @SW_HIDE, 4 + 2) Local $sStdOutRead = "" While ProcessExists($iPID) $sStdOutRead &= StdoutRead($iPID) sleep(500) WEnd msgbox(0,"",$sStdOutRead)
  20. Could be useful! Thanks! Btw, does it support .iso and .img?
  21. Well... I would do following [Pullet proof concept] 1. Download Hijackthis 2.02 and post the result www.hijackthis.de, You will get the result instantly [shows bad processes, service etc] 2. Skip the crap Avg etc and download Kaspersky 7. www.kaspersky.com [Will eliminate all threats] 3. Update Windows! 4. Clean up startup and services. 5. Something you need to run a registry checker, especially if you run win 2k, 2 of 10 computer has corrupt update reg etc after a virus/trojan attack. Good luck!
  22. EDIT:NVM, Tired, didn't read your question fully Took a fast look at the site, InetGet should work just fine. Maybe this will work, haven't tried it out yet. $URL = "http://www.shsforums.net/index.php?autocom=downloads&showcat=16" $OIE = _IECREATE($URL, 0, 0) ; Running IE in silence $OLINKS = _IELINKGETCOLLECTION($OIE) $COLLINKS = _IELINKGETCOLLECTION($OIE) For $OLINK In $COLLINKS $SURL = $OLINK.href If StringInStr($SURL, "confirm_download") Then ExitLoop Next If $SURL <> "" Then $SAVE = (@TempDir & "\download.zip") InetGet($SURL, $TORRENTSAVE) Else MsgBox(16, "Error", "No links found.") EndIf
  23. I have been trying to collect the save path of a Word document. So far, no luck. Any idea? Part of the script. ; For each Word window $oDoc = "" $oWordApp = "" $handle = WinGetHandle("classname=OpusApp", "") If $handle = "" Then ExitLoop $oWordApp = _WordAttach($handle, "HWND") If Not @error Then ; For each DOC $colDocs = _WordDocGetCollection($oWordApp, -1) If @error = 0 Then For $oDoc In $colDocs _WordDocSave($oDoc) If @error = 1 Then ; Check if savepath is selected. RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce' , 'WordDoc' & $i, 'REG_SZ', '"' & @ScriptDir & "\Test" & $i & ".doc" & '"') _WordDocSaveAs($oDoc, @ScriptDir & "\Test" & $i & ".doc") $i += 1 EndIf Next Else ;MsgBox(16, "Error", "Error retreiving collection of Docs") ExitLoop EndIf Else ;MsgBox(16, "Error", "Error attaching to Word window by HWND") ExitLoop EndIf _WordQuit($oWordApp)
  24. Thanks for your help Martin! Tried the script this morning, and guess what, it worked? Haven't changed anything
×
×
  • Create New...