Jump to content

Problem opening browser (Google Chrome) - (Moved)


stiv
 Share

Recommended Posts

 

hello ,
I have a problem, when I run the autoit, the browser (Google Chrome) opens the window and closes instantly.

I have tried the following code,

ShellExecute("chrome.exe"")   or also Run(""C:\Program Files\Google\Chrome\Application\chrome.exe"").

Thank you for your attention

 

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

12 hours ago, stiv said:

I have tried the following code,
ShellExecute("chrome.exe"")   or also Run(""C:\Program Files\Google\Chrome\Application\chrome.exe"").

;~ ShellExecute("chrome.exe")
Run("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")

copy and paste the above. Try it as is. Let us know it it worked. It did for me. 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Did you check the help file?

Function Run (autoitscript.com)

Run(@ComSpec & " /c " & 'start /min  http://../html/myhtml.html ', @ScriptDir, @SW_HIDE) ; don't forget " " before "/c" ; 2018.08.01
  • Opening the exe with no purpose, means it closes after it has run (no error)
  • For RUN the param /c forces it open
  • In this example the command line forces windows to use the default program associated with the target, eg chrome opens the local HTML page
  • @SW_HIDE runs the command in a hidden window, but the browser opens
  • The start /min param keeps the browser minimized
  •  

Skysnake

Why is the snake in the sky?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...