Jump to content
jwhausk

Auto open Edge with 2 tabs and navigate to my page

Recommended Posts

jwhausk

Hi, I would like a script to open Edge and navigate to 2 different pages

Open Edge tab 1 www.MyHomePage.com,  Tab 2 www.google.com

Thank you, John

Share this post


Link to post
Share on other sites
TheXman
Posted (edited)

Look up the ShellExecute(), Run(), or RunDos() functions in the help file to see some of the ways to launch a command.  For the actual command, use the link below.  To open additional tabs, you can execute the command again for each tab you would like to open.
 

http://lmgtfy.com/?s=d&q=how+to+start+microsoft+edge+from+command+line

Search engines can be very useful tools.  :D

Edited by TheXman
Corrected typo and added a little more info.
  • Like 1

Whoever said that there's no such thing as a dumb question, probably asked a lot of DUMB questions.  Dumb questions are ones that you can easily find the answer to on your own.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • whiskas
      By whiskas
      Hi all,
      I just upgraded to windows 10 and am using Edge as my browser now. Updated my scripts, but I can not unhide a minimized Edge window with the script anymore.
      WinSetState ( "titlle","", @SW_MAXIMIZE ) works fine, but not if it is minimized. Tried same with SW_SHOW, doesn't work.
      WinExists("title","") -> returns 1, so it is finding my window.
       
              WinWait($title,$text,$timeout)
              If Not WinActive($title,$text) Then WinActivate($title,$text)
              WinWaitActive($title,$text,$timeout)
      Doesn't work also, so I think I tried all but cant get the window back
      Any help would be appreciated
       
    • parrishjason
      By parrishjason
      Hello all.

      I currently have an AutoIT script that uses INetGet to retrieve and run files over a network. However, as it stands the app has currently changed to the point where I must open an actual browser in order to be able to get to the file (at least, this is the easiest way).
       
      Right now I have an extremely unreliable and clunky set of Send and Click commands to accomplish this task with sleeps in between everything to the point where I *hope* my file was downloaded before I try to click the "Run" button in microsoft edge. 
       
      I've been looking into IUIautomation, but I'm having quite a time understanding how to actually use it properly.
       
      I'd think that a script to navigate to a URL, download a file, then click "Run" in the browser would be simple. If I can get any help that'd be highly appreciated.
       
      Once I see a sample of how to download the file, the navigation part should be quite trivial to figure out.
    • Rhazz
      By Rhazz
      Hi, I'm trying to upload a file with a web browser but I can't select the Open File window to select the file that I want to upload.
      TL;DR I can't handle the Open File window of Chrome and MS Edge. AutoIt just doesn't find it by its title (in Firefox yes, but not on Chrome and MS Edge).
      With another software (Selenium Webdriver in Python) I access to a web page with a common HTML5 file uploader and I click on it, but when the Open File window comes up, I want to select a file and press Enter (write the filepath that I give and press Enter key or Open button).
      I have the idea, and I have the script on AutoIt too... but it doesn't work on Windows Edge and Chrome, only works on Firefox and Pale Moon (who are basically the same).
      Here is my code:
      #include <MsgBoxConstants.au3> $title = "Abrir" ; My Windows is in spanish, but I guess it's "Open" in English and it's the same code WinActivate($title) If WinActive($title) Then send("C:\Users\myuser\images\my_image.jpg") Send("{ENTER}") Else MsgBox($MB_SYSTEMMODAL, "WinActive", "Window not found.") EndIf In Firefox (and Pale Moon) the Open File window comes up, the file path is written and the Enter key is pressed. It works perfect.
      In Chrome and Edge, I never see the Open File window on top... and I neither see "Window not found" message (seems like AutoIt finds it but doesn't send keys).
      Edit: before to send this post, I started thinking again and... after several tests, I discovered one thing: when you select the window, in Firefox (and Pale Moon) the cursor goes to the combobox (where I have to put the text) and it's possible to write just after clicking (or opening, what in AutoIt it is "Activate" I guess) the window but in Chrome and Edge it isn't like that, when you click the window, the cursor doesn't go to the combobox.
      With that "discovery", I tried to select the combobox but... I failed again. And now I have no idea how to go ahead.
      #include <MsgBoxConstants.au3> $title = "Abrir" WinActivate($title) If WinActive($title) Then ControlClick($title, "", 1148) ; Still it does not work send("C:\Users\myuser\images\my_image.jpg") Send("{ENTER}") Else MsgBox($MB_SYSTEMMODAL, "WinActive", "Window not found.") EndIf  
    • Kyan
      By Kyan
      I know this ain't much (nothing for autoit experts) but can help someone who was looking for a selectable label
       
      (I used the hex values to avoid #include <EditConstants.au3>, the vars are in comment in front of the 2nd line)
       
      $Form1 = GUICreate("Test", 351, 50) $Label1 = GUICtrlCreateEdit("Selectable Label", 10, 4, 176, 20, 0x0800,0x00000020) ;$ES_READONLY, $WS_EX_TRANSPARENT GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch WEnd PS: I think the same could be accomplished with GUICtrlCreateInput()
    • XuxinhaKill
      By XuxinhaKill
      Ok I just need to take the scroll bars away from my objects...


      #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Xuxinha", 800, 600) GUISetState(@SW_SHOW) #EndRegion ### END KodaGUI section ### $Obj = ObjCreate("Shell.Explorer.2") $Obj2 = ObjCreate("Shell.Explorer.2") $GX = GUICtrlCreateObj($Obj, 0, 0, 800, 250) $GX2 = GUICtrlCreateObj($Obj2, 0, 350, 800, 250) $Obj.Navigate("google.com") $Obj2.Navigate("google.com") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
×