Jump to content

Search the Community

Showing results for tags 'url'.

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

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 23 results

  1. Hello, I'm creating a program to help me analyze stocks. So a big part of my tool is web scraping. As of yesterday, the _INetGetSource command seemed to stop working for the page that tells me a stock's info which is on yahoo finance (I'll ref the link below). Here is the simplified version of the code. #include <Inet.au3> ConsoleWrite(_INetGetSource('https://finance.yahoo.com/quote/AAPL')) It's strange because before yesterday, it was pulling the code from those pages correctly. The _INetGetSource will work for most other yahoo pages, even the finance home page (finance.yahoo.com) but not the page that shows me a specific stock's info. Does anyone know why it stopped giving me the source code for those pages?
  2. Hi, I am new to Autoit, Kindly guide me. I wanted to send a message with HTTP/GET to the URL https://ghsff.it/. How to do so?
  3. _FileGetShortcutEx This UDF will return shortcut (.LNK) file information for more advanced shortcuts that AutoIt's built-in FileGetShortcut() chokes on. The following types of shortcuts can be retrieved using this function: MSI Advertised Shortcuts URL (website) Shortcuts that are embedded (rather than put in a .URL file) Special GUID Shell Item Shortcuts. This is only one level deep at the moment, so it will only read the base Folder GUID (For example: shortcuts to 'My Computer', 'Recycle Bin' return fine) UNC Shortcuts ("PCNAME"). This is also only one level deep currently, so "PCNAMEFolder" shortcuts will fail (as well as regular shortcuts, of course) Operation is simple: call '_FileGetShortcutEx("filename")' to get an array that is arranged the same as FileGetShortcut(). Included in the ZIP are two examples of shortcuts that AutoIt will fail on, but this function will work on. I don't have any MSI Advertised shortcut examples, but I believe Microsoft Office and ACDSee shortcuts both use these shortcuts types which return wonky results using AutoIt's function. Thanks go out to Prog@ndy for the original '_FileGetShortcutEx' function and MSI shortcut code (which I converted for Unicode). See my original post here for his code. *Shortcut Key retrieval* This was requested on the Help board, and I thought it was a good idea to include it here. If you need to grab a shortcut's associated Shortcut Key, you can use the below code, assuming you already know beforehand that the file is a shortcut file: $sShortcutFile = "C:\MyShortcut.lnk" $nShortcutKey = Number(StringToBinary(StringMid(FileRead($sShortcutFile, 68), 65, 4))) ConsoleWrite("Shortcut key = " & $nShortcutKey & @CRLF) The format of the key is described under IShellLink::GetHotkey, and I've included code that converts most key combos in >this post. *Special note on 'Normal' Internet shortcuts: While this UDF only looks at .LNK shortcuts (what you use FileGetShortcut() with), some confuse .URL Internet shortcuts with these types, so I decided I'd put a solution for those interested on how to get a URL Internet shortcut. It's actually so simple it can be done in one line, so here it is (note the .URL extension): $sURL=IniRead(@UserProfileDir&"\Favorites\Google.URL","InternetShortcut","URL","") Ascend4nt's AutoIT Code License agreement: no license - just be a good person and credit other people for their work, yeh? Download the ZIP from my site
  4. I have a script that seems to launch perfectly fine with IECreate, however, I want to launch the Browser and a specific URL with the RunAs command. I fairly new to AutoIT and wanted to know if someone can point me in the right direction. Local $surl = "http://somewebsite.com/DODA/admin/job.aspx" Local $oIE = _IECreate($sURL) The above launches the website correctly with the correct URL, however, I have tried the below and this fails to load and browser? #include <AutoItConstants.au3> ;======================== $oSleep = "200" Local $surl = "http://somewebsite.com/DODA/admin/job.aspx" Local $oIE = RunAs($args("username"), $args("domain"), $args("logonpassword"), "", "C:\Program Files (x86)\Internet Explorer\iexplore.exe http://somewebsite.com/DODA/admin/job.aspx") _IELoadWait($oIE) I get the following error back? --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType
  5. hello sirs please i want to use the WinHttp to get the google drive file title using the api i searched in the forom but i didn't found any Google drive api UDF for that i liked to ask you for that i had read the google drive api documentation but i couldn't do it please help me here is the api doc note i've got the apikey and i have the file id what i want is to get the title of the file (the file name) because i want to download the files from the google drive using the autoit please help me for that am sorry because i didn't gave you any example or what i tried but all what tried was failed thanks in advance
  6. hello sirs i've some questions about StringRegExpReplace i hope you can help me i tried to make a function that give me the host of the url and other give me the url with out host for example i've this link https://www.example.com/vb/result.php i need the first give me the example.com and the other give me /vb/result.php i find that $s_source = "https://www.google.com/vb/index.php" Local $s_Host = StringRegExpReplace($s_Source, '.*://(.*?)/.*', '\1') Local $s_Page = StringRegExpReplace($s_source, '.*://.*?(/.*)', '\1') msgBox(64, $s_Host, $s_Page) but i found some problems i need your help to correct it first: when i get the host if the url has www i want to remove it second: if the url with out host did not have other things i need the result to be "" e.g https://www.example.com the first i want it example.com and the second i want it to be "" i hope that you can help me thanks in advance
  7. I created an application to catch keyboard programmed keys. Some of the keys open URL's via ShellExecute and then they open in the default browser. The problem I am having is that when the browser is opened in this manner 3rd party applications such as Logitech Setpoint for Logitech mouse and keyboards and programs like auto password form filling stop working with the browser. In the mouse specific situation the Cruise Up and Cruise Down buttons, normally back and forward, do not work. If I open the browser manually via the browsers icon and then press the keyboard buttons to open the web page everything works normally. I have two questions: 1: Why does ShellExecute("http://www.autoitscript.com") when the browser is not open and then is launched, via the above line, cause third party apps to not be able to interface with the browser? 2: What is a better way to launch URL's if not via ShellExecute? The application is NOT using #RequireAdmin and is not 64bit.
  8. I apologize for my poor coding skills, but only on occasion do I have a need to automate a repetitious task to save time. In a nutshell the following code is supposed to go to a website, save the site using Scrapbook (a plugin used by an older version of Firefox), rename the folder in Windows Explorer that Scrapbook assigns a random name for and then moves on to the next website, of which there are hundreds. Everything works, except after the address bar gets populated with the URL, it's like the ENTER key never gets pushed. The weird thing is, this worked yesterday before I left to go home and when I came in this morning it didn't work. The next thing I'll be trying to learn is to loop this with a the list of the websites. Thank you for your help! WinActivate( "[CLASS:MozillaWindowClass]" ) ;Apply focus to the open Mozilla firefox window Sleep(500) Send("^k") ;Apply focus to the address bar Sleep(500) Send("www.WEBSITE.com {ENTER}") ;Send the website to the address bar Sleep(10000) ;Wait for the website to fully open Send("!c") ;Opens the drop down menu for Scrapbook Sleep(2000) Send("{ENTER}") ;Selects the default drop down selection of save Sleep(20000) WinActivate( "[CLASS:CabinetWClass]" ) ;Applies focus to the open Windows Explorer window where the websites are saved Sleep(1000) Send("{SPACE}") ; Selects a folder in the folders list Sleep(200) Send("{HOME}") ;Moves to the top folder Sleep(200) Send("{F2}") ;Keyboard shortcut to rename the folder Sleep(200) Send("www.WEBSITE.com {ENTER}") ;Applies the new name to the folder
  9. Hello all I have a question please I have a link to an .exe file for example this link https://www.nvaccess.org/files/nvda/releases/2017.1/NVDA_2017.1.exe I want to check if the link is exists orno surely Without downloading the file is there any function or a way to do this? Thanks in advance
  10. I've finally come up with a simple solution for dragging & dropping a URL. It's not perfect, but it does the job. Mostly just a tweak of some Help file examples. Thanks also to AutoBert, for his StringRegExp and example that set me on the right path. I have seen this requested for many times, so enjoy! It goes without saying, that any improvements are welcome. Dropbox For URLs.au3 #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $hGui, $g_hRichEdit Example() Func Example() Local $cnt, $URL, $val, $text Local $iMsg, $state = $WS_CAPTION + $WS_POPUP + $WS_CLIPSIBLINGS + $WS_SYSMENU $hGui = GUICreate(StringTrimRight(@ScriptName, 4), 160, 100, -1, -1, $state, $WS_EX_TOPMOST) $g_hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 140, 80, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState(@SW_SHOW) _GUICtrlRichEdit_SetEventMask($g_hRichEdit, $ENM_LINK) _GUICtrlRichEdit_AutoDetectURL($g_hRichEdit, True) $cnt = 0 While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($g_hRichEdit) ExitLoop Case Else If $cnt = 20 Then $text = _GUICtrlRichEdit_GetText($g_hRichEdit) If $text <> "" Then $val = StringRegExp($text, "(?s)((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)", 2) If UBound($val) > 0 Then $URL = $text ClipPut($URL) ;MsgBox(0, "URL", $URL, 0, $hGui) Else _GUICtrlRichEdit_SetText($g_hRichEdit, "Only URL's are supported!") ;MsgBox(0, "Not URL", "Only URL's are supported!", 0, $hGui) EndIf Sleep(600) _GUICtrlRichEdit_SetText($g_hRichEdit, "") EndIf $cnt = 0 Else $cnt = $cnt + 1 EndIf EndSelect WEnd EndFunc ;==>Example GUIDelete($hGui) Exit I also wanted a version that would work with an earlier version of AutoIt (v3.3.0.0), to use with updates for some older scripts (programs). The following works fine on my Win XP laptop, but fails (also when compiled) on my Win 7 Netbook. I found a RichEdit example in the GUICtrlCreateEdit function (Example 2) in the AutoIt v3.3.0.0 Help file, and modified that to suit my script. Failure is no doubt due to 'MSCOMCT2.OCX' missing from the System32 folder, at the very least. Any solution to getting the following to work on Win 7 would be greatly appreciated. Perhaps a different '.OCX' file etc. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> Global $oMyError RichEditExample() Exit ; Rich edit control EXAMPLE using GUICtrlCreateObj ; Author: Kåre Johansson ; AutoIt Version: 3.1.1.55 ; Description: Very Simple example: Embedding RICHTEXT object ; Needs: MSCOMCT2.OCX in system32 but it's probably already there ; Date: 3 jul 2005 Func RichEditExample() Local $cnt, $DropBoxGUI, $GUIActiveX, $msg, $oRP, $state, $text, $URL, $val $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $oRP = ObjCreate("RICHTEXT.RichtextCtrl.1") If @error Then Return $state = $WS_CAPTION + $WS_POPUP + $WS_CLIPSIBLINGS + $WS_SYSMENU $DropBoxGUI = GUICreate(StringTrimRight(@ScriptName, 4), 160, 100, -1, -1, $state, $WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oRP, 0, 0, 140, 80) GUICtrlSetPos($GUIActiveX, 5, 5, 150, 90) $cnt = 0 With $oRP; Object tag pool .OLEDrag() .Font = 'Arial' .Text = @CRLF & @CRLF & " Drag & Drop a URL here." .SelBold = True .BackColor = 0xff00 ;.FileName = @ScriptDir & '\RichText.rtf' ;$oRP.AboutBox() ;$oRP.SelBold = False ;$oRP.SelItalic = False ;$oRP.SelUnderline = False ;$oRP.SelFontSize = 8 ;$oRP.SaveFile(@ScriptDir & "\RichText.rtf", 0) EndWith GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete($DropBoxGUI) ExitLoop Case Else If $cnt = 20 Then $text = $oRP.Text If $text <> "" Then If $text = @CRLF & @CRLF & " Drag & Drop a URL here." Then Sleep(2000) Else $val = StringRegExp($text, "(?s)((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)", 2) If UBound($val) > 0 Then $URL = $text ClipPut($URL) ;MsgBox(0, "URL", $URL, 0, $hGui) Sleep(600) Else With $oRP .Text = "Only URL's are supported!" EndWith ;MsgBox(0, "Not URL", "Only URL's are supported!", 0, $hGui) Sleep(1500) EndIf EndIf With $oRP .Text = "" .SelBold = False EndWith EndIf $cnt = 0 Else $cnt = $cnt + 1 EndIf EndSelect WEnd EndFunc ;==>RichEditExample Func MyErrFunc() MsgBox(0, "AutoItCOM Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & Hex($oMyError.number, 8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext , 5) ; Will automatically continue after 5 seconds Local $err = $oMyError.number If $err = 0 Then $err = -1 SetError($err) ; to check for after this function returns EndFunc ;==>MyErrFunc And a slower embedded IE based version. This has an error in latest AutoIt, but works fine in v3.3.0.0. #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> Local $DropboxGUI, $GUIActiveX, $loaded, $loops, $oBody, $oIE, $sHTML, $timeout, $urlpage _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() $DropboxGUI = GUICreate("URL Dropbox", 140, 140, -1, -1, _ $WS_OVERLAPPED + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_SYSMENU, $WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oIE, 5, 5, 125, 100) $oBody = _IETagNameGetCollection($oIE, "body", 0) _IEDocInsertHTML($oBody, "", "afterbegin") $loaded = _IEPropertyGet($oIE, "locationurl") $urlpage = $loaded $loops = 0 $sHTML = "" $sHTML &= "<HTML>" & @CR $sHTML &= "<HEAD>" & @CR $sHTML &= "<TITLE>Drag And Drop Example</TITLE>" & @CR $sHTML &= "</HEAD>" & @CR $sHTML &= "<BODY>" & @CR $sHTML &= "</BODY>" & @CR $sHTML &= "</HTML>" _IELoadWaitTimeout(1) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ; Quit, Close or Exit window GUIDelete($DropboxGUI) ExitLoop Case Else ;;; If $loops = 10 Then $loops = 0 $loaded = _IEPropertyGet($oIE, "locationurl") If $loaded <> $urlpage Then _IEAction($oIE, "stop") _IEDocWriteHTML($oIE, $sHTML) If $loaded = "res://ieframe.dll/navcancl.htm" Then $loaded = "" $urlpage = $loaded _IEBodyWriteHTML($oIE, '<p style="WORD-WRAP: normal; WORD-BREAK: break-all; FONT-SIZE: 8px">' & $loaded & '</p>') EndIf Else $loops = $loops + 1 EndIf EndSelect WEnd Exit
  11. Hey fellas, I'm looking for an easy way to get an URL from an active browser. Now, I know about chrome and IE includes but the script I'm writing will be used by users with different browsers, obviously. I can imagine have both IE and Chrome includes in the script, identifying what browser the user uses etc but I was wondering if there is any other easier way. Thanks Seminko
  12. Hello, i was wondering how i would go about opening a random URL from a predefined list? i am trying to create a small game for the kids, where they have a question and they have to find out the answer (finish the story) from the pages that open...but i need all the pages to be at random, so they need to work out which part comes first, second, third...etc. the code i use to open the URL is and to close the browser: shellexecute("THE URL") If ProcessExists("firefox.exe") Then ProcessClose("firefox.exe") endif is it possible to creaet like a shellexecute("$random") and then add my url's as a ranodm variables? or would it be better to add each script with URL / porcessclose and randomly pick which "url" to open? all help much appreciated MrYonG
  13. Internet Shortcut Sanitizer With the newest Firefox and IE browsers, there's a bit of an issue with Internet Shortcuts created, which have been traditionally saved in a .URL file on Windows (an INI-structured file). Firefox now adds Icon information to the file which points it at a location within %localappdata%MozillaProfiles. This to me is annoying and unnecessary. While it may reflect the favicon of a website, its got a few problems: When the cache is cleared or the bookmark is moved to another computer or put on a fresh install, that icon isn't there anymore. These shortcuts contain your logon name (part of %localappdata%), so be aware of this if you are going to share them! (or just use a generic logon) Here's the content of a typical Firefox .URL file (<LogonName> is your Windows logon): [InternetShortcut] URL=http://www.google.com/ IDList= HotKey=0 IconFile=C:\Users\<LogonName>\AppData\Local\Mozilla\Firefox\Profiles\a3n21a.default\shortcutCache\md34sdyu7s_g==.ico IconIndex=0 _ Update: if you have Firefox 21, you can follow and edit Firefox's about:config settings to fix the way URL shortcuts are created. Internet Explorer (IE 9+) now has its own new shortcut extension (.website), which seems to only work with the IE browser. These files are basically 'enhanced' internet shortcuts. The extra information included is cryptic, and appears to be of no use outside of IE. However, the INI-format is the same, and the [internetShortcut] section is the same, so it can simply be renamed to have a .URL extension. Here's the content of a typical Internet Explorer 9+ .website file: [{000214A0-0000-0000-C000-000000000046}] Prop4=31,Google Prop3=19,2 [{A7AF692E-098D-4C08-A225-D433CA835ED0}] Prop5=3,0 Prop9=19,0 [InternetShortcut] URL=http://www.google.com/ IDList= IconFile=http://www.google.com/favicon.ico IconIndex=1 [{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}] Prop12=19,2 Prop5=8,Microsoft.Website.9CB8E698.8730F9E8 _ (Note the embedded [internetShortcut] section) Sanitize your shortcuts! The fix for these problems? A little Internet Shortcut Sanitizer program. If you're like me and just want Internet Shortcuts to be just that - a simple file with a URL in it, then this program will give you what you need. It strips everything out but the 2 lines necessary to work as a .URL file: [InternetShortcut] URL=http://www.website.com _ The script will also create .URL's from .website files and remove all the IE related stuff. Currently it either takes 1 parameter or allows you to select 1 file to change. However, it can be adapted to work on multiple files with a little extra effort. However, I'd recommend something like grepWin to clear out folders (see 3rd post), and maybe a batch file renamer to deal with .website -> .URL conversion. Below is the script. Changelog: 2013-05-17: - Packaged the main functionality of the script into the embedded UDF: _InternetShortcutSanitize() ; ================================================================================================================== ; <InternetShortcutSanitizer.au3> ; ; 'Sanitizes' Internet shortcuts, both of the traditional Windows .URL format and of the newer IE .website format ; In the case of the latter, it will delete the .website variant and create a URL version ; ; Author: Ascend4nt ; ================================================================================================================== Local $sFile If $CmdLine[0] < 1 Then $sFile=FileOpenDialog("Select Internet Shortcut to Sanitize","","Internet Shortcut Files (*.URL;*.website)|All Files (*.*)",3) If @error Or $sFile="" Then Exit Else $sFile = $CmdLine[1] EndIf $sFile = StringStripWS($sFile,3) If Not FileExists($sFile) Then Exit ;~ ConsoleWrite("Internet Shortcut file to sanitize = "&$sFile&@CRLF) _InternetShortcutSanitize($sFile) ; =================================================================================================== ; Func _InternetShortcutSanitize($sFile) ; ; 'Sanitizes' the Internet shortcut file passed. This keeps URL files to a 2-line file of this format: ; [InternetShortcut] ; URL=http://www.website.com ; ; In the case the input file is an Internet Explorer .website shortcut (in IE 9+), it will ; create a .URL file of the same name, and upon successful write, it will delete the .website file. ; ; $sFile = Full path to file to sanitize ; ; Return: ; Success: True ; Failure: False with @error set ; ; Author: Ascend4nt ; =================================================================================================== Func _InternetShortcutSanitize($sFile) If $sFile = "" Then Return SetError(1,@error,False) ; Get rid of whitespace at beginning & end $sFile = StringStripWS($sFile,3) Local $sFileOut, $nRet Local $sURL = "", $sFileContent = "" $sURL = IniRead($sFile, "InternetShortcut", "URL", "") If @error Or $sURL = "" Then Return SetError(-1,@error,False) ;~ ConsoleWrite("URL = "&$sURL&@CRLF) ; Standard URL format $sFileContent = "[InternetShortcut]"&@CRLF&"URL="&$sURL&@CRLF ; $sFileOut: If not .website, we keep it the same. ; Otherwise, we transfer it to a .URL file If StringRight($sFile, 8) = ".website" Then $sFileOut = StringReplace($sFile, ".website", ".URL", -1) Else $sFileOut = $sFile EndIf ; Create/Overwrite the URL file $hFile = FileOpen($sFileOut, 2) If $hFile = -1 Then Return SetError(3, 0, False) $nRet = FileWrite($hFile, $sFileContent) FileClose($hFile) ; FileWrite error? If Not $nRet Then ;~ ConsoleWrite("File Write error"&@CRLF) Return SetError(4,0,False) EndIf ; .website -> .URL 'translation' performed? Delete .website file If $sFile <> $sFileOut Then ; Make sure we actually created the .URL file before delete: If FileExists($sFileOut) Then FileDelete($sFile) EndIf Return True EndFunc
  14. Hello I want to crack a URL by using the _WinHttpCrackUrl() function located in >winhttp UDF It goes well for some URL's but for other URL's it gives error and sets the @error to 1 the URL and my example #include "WinHttp.au3" #include <Array.au3> $url = "http://www.domain.com/dm/r.php?r=m%7C%23%23%7Cgh-oiv_%2Cf8t%2Cxg4%7C%23%23%7CWINbf%7C%23%23%7CCz1ytu9w%200%2F19%20%5C%5CMIDOOOcc%7C%7CccFt22%20Cz1ytu9w%200%2F19%20M5%2Czzzcc%7C%7CccUv9w%200%2F19%20M5%2Czcc%7C%7CccWzw3vu%2Fu5z0%20%2F-u5s9%20z0%20N9uBTbT-y5yb%7BfAjljEgBcFFnhcjAgncAkfCcjAhemfmElBAn%7D%20%28nninihCnnnnf%29cc%7C%7CccN9uBTbT-y5yb%7BmfmnhfhjchjmkcjiBfcBAkCcjBjAlmjnAmei%7D%20%28nninihCnnnnm%29cc%7C%7CccN9uBTbT-y5yb%7BfBEkfhikcBnilcjhmAcAngmcCkFfnkhmlBEA%7D%20%28BfghkFnCglek%29cc%7C%7CccSz8ur%2Fw9%20s9wv5z0%20W50%2Czrv%20f%20E0u9wyw5v9cc%7C%7CccWzw3vu%2Fu5z0%20%2Cz1%2F50%20WORKGROUPcc%7C%7CccLz7z0%20%2Cz1%2F50%20M5%2Czzzcc%7C%7CccCOM%20Oy90%20T519ztu%20%28v9-%29%20ncc%7C%7CccCOM%20S90%2C%20Czt0u%20%28_pu9%29%20mhcc%7C%7CccCOM%20S90%2C%20T519ztu%20%281v9-%29%20lincc%7C%7CccT69%20-z11%2F0%2C%20-z1y29u9%2C%20vt--9vv8t22p.cc%7C%7Ccc" $aUrl = _WinHttpCrackUrl($url) MsgBox(0, "Error", @error) _ArrayDisplay($aUrl, "_WinHttpCrackUrl()") if anyone can help in this thanks
  15. I created this little script: HotKeySet("!g", "searchgoogle") While 1 Sleep(10000) WEnd Func searchgoogle() Sleep(500) Send( "^c" ) Sleep(500) $ClipB2 = ClipGet() $url = "http://www.google.com/search?q=" & $ClipB2 Sleep(300) MsgBox(0,"",$url) EndFunc I just select a word and invoke the hotkey. More than an hour I try to change the Sleep values but something still does not work: When I invoke the 1st time the hotkey, almost always it returns the correct url, but when I reuse the hotkey a few times it doesn't copy any more and the url is constructed with previous clipboard value. Does anyone know what is wrong in my script?
  16. Hi guys, i have a little problem with a $var of this script, i don't know how to make it: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <String.au3> #include <File.au3> Global $image $GUI = GUICreate("Test GUI", 466, 360, -1, -1) $InfoButton = GUICtrlCreateButton("Info", 14, 312, 123, 25) $WebPic = GUICtrlCreatePic(_GetURLImage('"' & $image & '"'), 16, 216, 120, 90) If @error = 1 Then $GroupPic = GUICtrlCreateGroup("", 15, 210, 120, 100) EndIf GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $InfoButton Read_Info() EndSwitch WEnd Func Read_Info() Dim $logfile = @WorkingDir & "\test.txt" If FileGetSize($logfile) <> 0 Then Global $image = FileReadLine($logfile, 2) MsgBox(0,0, FileReadLine($logfile, 2)) EndIf EndFunc ;==>Read_Info Func _GetURLImage($sURL, $sDirectory = @TempDir) Local $hDownload, $sFile $sFile = StringRegExpReplace($sURL, "^.*/", "") If @error Then Return SetError(1, 0, $sFile) EndIf If StringRight($sDirectory, 1) <> "\" Then $sDirectory = $sDirectory & "\" EndIf $sDirectory = $sDirectory & $sFile If FileExists($sDirectory) Then Return $sDirectory EndIf $hDownload = InetGet($sURL, $sDirectory, 17, 1) While InetGetInfo($hDownload, 2) = 0 If InetGetInfo($hDownload, 4) <> 0 Then InetClose($hDownload) Return SetError(1, 0, $sDirectory) EndIf Sleep(105) WEnd InetClose($hDownload) Return $sDirectory EndFunc ;==>_GetURLImage The Test.txt blabla dizziness-and-balance.com/images/eye-chart.jpg blabla I have removed the http://www. on the forum, but on the file the link is full On MsgBox or ConsoleWrite i see the full link ( the link posted change everytime, so i can't make a direct link to the image on PC ) but the image is not loaded on GUI. What is the problem? Thanks for support
  17. Hi all, I'm using an embedded IE object to fill in a form and submit it. The form uses the POST method and has a Javascript function which runs when the form is submitted and changes some values according to what is entered into the form and generates a nonce, etc. When the form is submitted a file download is triggered. How could I deal with this because at the minute the file download dialog is appearing? The only way I can think of is to send a keypress when the file download window becomes active but I have seen that this is not reliable. Thanks in advance
  18. I know the link text on the web page How can I extract the url associated with that link text, please let me know OR If I use _IELinkClickByText function and load the page in Internet explorer, how can I fetch the url from the address bar of the IE Please help.
  19. Can some expert with regular expression help me to obtain expected data from a string like that: What I try to get is the name, detected & result. Something like: CLEAN MX false clean site Any idea?
  20. Task : If Java.exe opens and it's parent process is a browser, get the URL of the web page it has open (hopefully the URL that started java). I would love a way to do it remotely, but can live with having to run a monitor on the local machine. What I have now is a function that uses WMI to query win32_process and get the processes and parent process id, searches that for Java and puts that info into a report. I want to include the URL of the webpage that launched java. What I have so far is below, but it doesn't let me tie the Process ID to the window I get the URL from. It also will not get Firefox windows. The Shell method only gets Shell windows. I have nine windows open, but it only picks up two - internet explorer and file system explorer - missing both Firefox windows and all their tabs. So, the question is - how to get a browser object when I start with only a Process ID and get the URL from that object? On a remote computer? $oShell = ObjCreate("shell.application") ; Get the windows shell object $oShellWindows = $oshell.windows ; Get open windows If IsObj($oShellWindows) Then $string = "" For $Window in $oShellWindows ; count all windows $Wpid = ObjName($Window,3) $string = $string & $Window.LocationName & " ; " & $Window.FullName & " ; " & $Wpid & @CRLF If StringInStr($Window.FullName, "iexplore") Then MsgBox(0,"Internet Explorer", "You browsing the URL " & $Window.Document.Location.href) EndIf Next MsgBox(0,"Shell Windows", "You have the following " & $oShellWindows.Count & " windows open:" & @CRLF & $string); EndIf Fantasy code I would like to work: $objWMIService = ObjGet("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & $strPCName & "\root\cimv2") If IsObj($objWMIService) Then $colProcesses = $objWMIService.ExecQuery( _ "select * from win32_process") For $objProcess In $colProcesses If $objProcess.ProcessId = $javaparentPID Then $Name = $objProcess.LocationName $URL = $objProcess.Document.Location.href Endif Code that gets the process IDs : Func _ProcessInfo($strPCName) Dim $i = 0 Dim $User, $Domain, $objWMIService, $colProcesses, $procnum Dim $Aprocesses[1][9] Dim $pi, $ppi, $parent, $parentfound $objWMIService = ObjGet("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & $strPCName & "\root\cimv2") ; Gather process information into an array If IsObj($objWMIService) Then $colProcesses = $objWMIService.ExecQuery( _ "select * from win32_process") For $objProcess In $colProcesses $i = $i + 1 ReDim $Aprocesses[$i + 1][9] $Aprocesses[$i][1] = $objProcess.ProcessId $Aprocesses[$i][2] = $objProcess.Caption $Aprocesses[$i][3] = $objProcess.HandleCount $Aprocesses[$i][4] = $objProcess.ExecutablePath $Aprocesses[$i][5] = $objProcess.ParentProcessId $Aprocesses[$i][6] = $objProcess.CreationDate If $objProcess.GetOwner($User, $Domain) = 0 Then $Aprocesses[$i][7] = $Domain & _ "\" & $User Else $Aprocesses[$i][7] = "" EndIf Next $Aprocesses[0][0] = $i $procnum = $i ;_ArrayDisplay($Aprocesses) ; Process the information about the Processes - LOL! $parentfound = 0 For $pi = 1 To $procnum ; only looking for Java, so : If StringInStr($Aprocesses[$pi][2], "java") Then $parent = $Aprocesses[$pi][5] For $ppi = 1 To $procnum If $Aprocesses[$ppi][1] = $parent Then $parentfound = 1 ExitLoop EndIf Next If $parentfound = 1 Then ; It has a parent process still running! $line = $strPCName & "," & $Aprocesses[$pi][1] & "," & $Aprocesses[$pi][2] & "," & $Aprocesses[$pi][3] & "," & _ $Aprocesses[$pi][4] & "," & $Aprocesses[$pi][5] & "," & $Aprocesses[$pi][6] & "," & _ $Aprocesses[$ppi][6] & "," & $Aprocesses[$ppi][2] & "," & $Aprocesses[$ppi][4] & "," & _ $Aprocesses[$ppi][7] FileWriteLine($LogFile, $line) Else ; parent process left. No, little java, its not your fault... :) $line = $strPCName & "," & $Aprocesses[$pi][1] & "," & $Aprocesses[$pi][2] & "," & $Aprocesses[$pi][3] & "," & $Aprocesses[$pi][4] & "," & _ $Aprocesses[$pi][5] & "," & $Aprocesses[$pi][6] & ",Parent already closed or not found" & ",Owner = ," & $Aprocesses[$pi][7] FileWriteLine($LogFile, $line) EndIf EndIf $parentfound = 0 $ppi = 0 Next Else FileWriteLine($LogFile, $strPCName & ",Unable to query WMI on endpoint") EndIf EndFunc ;==>_ProcessInfo
  21. Is there a fast way of check to see if a URL is a download link before I use _IENavigate? Also, does anyone know how to disable all popup windows (like the are your sure you want to navigate away windows) without disabling scripting? Thanks
  22. Hello, this is an example script to convert a relative path uri to absolute path uri. This is found in html and someone who wants to parse the URL will find this useful. [EDIT 1] Modified the code to handle certain boundary conditions. [EDIT 2] Modified the code to meet certain conditions. abrel.au3
×
×
  • Create New...