Jump to content

hamohd70

Active Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by hamohd70

  1. I'm trying to use the ISN AutoIt Studio but I can't find much help in connecting the form created by the studio with the script. Can anyone please help me with this? how can a form created by the studio be connected to the script?
  2. Sorry , I just realized I posted the question in the wrong section! I can seem to be able to shift it!.
  3. I'm trying to use the ISN AutoIt Studio but I can't find much help in connecting the form created by the studio with the script. Can anyone please help me with this? how can a form created by the studio be connected to the script?
  4. Thanks.. this is fine. but I' looking for a way to run and parse google search results for the full line in this format C: starteam.myftp.org 18000 test1 text2 regards
  5. how can I use the StringRegEx function to extract certain lines of text from google search results in the following format: C: server port user password an example is this: C: starteam.myftp.org 18000 test1 text2 regards
  6. interesting code. can you please explain the StringRegEx part? $aRes = StringRegExp($text, '(?m)^(?:.*?(?<=\A|\v{4}|,|el=)([^":,\r\n]+))|(?:http|rtmp|rtsp)s?[^"\r\n]+', 3)
  7. Sorry, i forgot to attach the file. Thanks jguinch for the snippnet. I did this way.. $file = FileOpenDialog("Select your file",@DesktopDir,"Text document (*.txt)|All files (*.*)") $data = FileRead($File) $lines = StringSplit($data, @lf) If IsArray($lines) Then $linecount = $lines[0] Else $linecount = 0 Endif For $i = 1 to $linecount $txt = StringStripWS(FileReadLine($file, $i),1) if StringInStr($txt,'"') then $txt = StringReplace($txt,'"',"") if StringRegExp($txt, "(?mi)(\N*(?:(http)|(https)|(rtmp)|(rtmps)):\N*)") Then if StringInStr($txt,"http") Then $txt = StringMid($txt, StringInStr($txt,"http")) ElseIf StringInStr($txt,"https") Then $txt = StringMid($txt, StringInStr($txt,"https")) ElseIf StringInStr($txt,"rtmp") Then $txt = StringMid($txt, StringInStr($txt,"rtmp")) ElseIf StringInStr($txt,"rtmps") Then $txt = StringMid($txt, StringInStr($txt,"rtmps")) EndIf $upscount = $upscount + 1 ConsoleWrite ($txt &@CRLF) EndIf If StringinStr($txt, '#EXT') Then $downscount = $downscount + 1 EndIf Next Exit works just fine. Any comments to make it more efficient are welcome !! boc.txt
  8. how can I use the StringRegEx function to extract any line that has one of the following words: http,rtmp,rtmps,https from a file? thanks
  9. thank u all for the help
  10. thanks alot. I will try it.
  11. I'm writing a small LAN scanner to fit my purpose but I find the classical ping command is too slow. As a work around, I'm planning to ask the user to limit the range of IPs to be scanned but I thinks it is always better if I can develop or fnd a faster way to do this. #include <Constants.au3> $vGateway = _IPConfig() _ScanLAN($vGateway) Func _IPConfig() Local $iPID, $sOutput = '' $iPID = Run(@ComSpec & ' /c ipconfig', @SystemDir, @SW_HIDE, $STDOUT_CHILD + $STDERR_CHILD) While 1 $sOutput = StdoutRead($iPID) If @error Then ExitLoop if StringInStr($sOutput," Default Gateway . . . . . . . . . : ") Then $sOutput=StringMid($sOutput,StringInStr($sOutput," Default Gateway . . . . . . . . . : ") + StringLen(" Default Gateway . . . . . . . . . : "), 15) Return $sOutput ExitLoop EndIf WEnd EndFunc Func _ScanLAN($vGatewayIP) Local $iPID, $sOutput = '' local $array=StringSplit($vGatewayIP,".") $BaseIP = $array[1] & "." & $array[2] & "." & $array[3] & "." $iPID = Run('"' & @ComSpec & '"', '', @SW_HIDE, $STDERR_MERGED + $STDIN_CHILD) for $i = 100 to 150 $command = "ping -a -n 1 " & $BaseIP & $i ConsoleWrite($command & @CRLF) StdinWrite($iPID,$command & @CRLF) While 1 $sOutput = StdoutRead($iPID) If @error Then ExitLoop if StringRight($sOutput,1) = ">" Then ExitLoop if StringInStr($sOutput,"Pinging ") Then If StringInStr($sOutput, "[") Then $StartLocation = StringInStr($sOutput,"Pinging ") + StringLen("Pinging ") $EndLocation = StringInStr($sOutput, "[") $sOutput=StringMid($sOutput,$StartLocation, $EndLocation - $StartLocation) ConsoleWrite ($sOutput & @CRLF) ExitLoop EndIf EndIf WEnd Next EndFunc here the code I wrote:
  12. I'm trying to create a player control buttons overlay on a running ffplay.exe process windows to allow functions like play, stop, step forward, ..etc. but to do this i need to get the window position of ffplay window first. any clue on how to do it?
  13. here is my code #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> $hGUI = GUICreate("Dropped Files", 500, 400, Default, Default, Default, $WS_EX_ACCEPTFILES) $hEdit = GUICtrlCreateEdit("", 10, 10, 480, 180) GUICtrlSetState($hEdit, $GUI_DROPACCEPTED) $hEdit_Handle = GUICtrlGetHandle($hEdit) $hEdit2 = GUICtrlCreateEdit("", 10, 210, 480, 180) GUICtrlSetState($hEdit2, $GUI_DROPACCEPTED) $hEdit_Handle2 = GUICtrlGetHandle($hEdit2) GUISetState(@SW_SHOW) Dim $EditControl While 1 $EditControl=GUIGetMsg(1) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_DROPPED drop($EditControl) EndSwitch WEnd Func drop($EditControlArray) Switch $EditControlArray[0] Case $hEdit2 Local $sLine, $iLine, $m3u8AddedFromFile=False $hFile = FileOpen(@GUI_DragFile) If $hFile = -1 Then MsgBox(0,'ERROR','Unable to open file for reading.') Exit 1 EndIf While 1 $iLine += 1 $sLine = FileReadLine($hFile) If @error = -1 Then ExitLoop If StringInStr($sLine, "http://") Then GUICtrlSetData($hEdit2, $sLine) $m3u8AddedFromFile=True ExitLoop EndIf WEnd if $m3u8AddedFromFile=False then GUICtrlSetData($hEdit2, @GUI_DragFile) FileClose($hFile) Case $hEdit GUICtrlSetData($hEdit, @GUI_DragFile) EndSwitch EndFunc
  14. I have a form with 2 textboxes and both accept drag and drop of files. how can I detect where the file was dropped? is it on text 1 or text 2? based on this I will write my action for each case. Thanks
  15. Thanks for the code. works great!
  16. I'm trying to find a way to detect URL of .m3u8 streams once available on aweb site. Tools like adblock plus can do it on firefox. Inspect element function on Chrome can do it too. any idea how this can be done?
  17. thanks for the help it worked fine both ways.
  18. I'm trying to start regedit under vista but it is refusing to start. The code i'm using is simple : RunWait("regedit") the same code is running fine under win XP. any help please ? Thanks
  19. this is a general question: how can i read and understand the value of the @extended macro ? thanks
×
×
  • Create New...