
hamohd70
Active Members-
Posts
23 -
Joined
-
Last visited
Everything posted by hamohd70
-
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?
- 250 replies
-
- isn autoit studio
- isn
-
(and 3 more)
Tagged with:
-
Connecting the ISN form to the script - (Moved)
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
Sorry , I just realized I posted the question in the wrong section! I can seem to be able to shift it!. -
Retrieve xtring from Google Search results
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
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 -
extract certain URLs from file using StringRegExp
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
thanks -
extract certain URLs from file using StringRegExp
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
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) -
extract certain URLs from file using StringRegExp
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
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 -
extract certain URLs from file using StringRegExp
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
here is the file.. -
is there a faster way to ping?
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
thank u all for the help -
is there a faster way to ping?
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
thanks alot. I will try it. -
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:
-
how to get window position of a
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
thanks -
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?
-
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
-
Thanks for the code. works great!
-
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?
-
regedit not starting under vista
hamohd70 replied to hamohd70's topic in AutoIt General Help and Support
thanks for the help it worked fine both ways. -
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
-
this is a general question: how can i read and understand the value of the @extended macro ? thanks