stiv Posted December 1, 2022 Share Posted December 1, 2022 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 More sharing options...
Moderators Melba23 Posted December 1, 2022 Moderators Share Posted December 1, 2022 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 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
SkysLastChance Posted December 1, 2022 Share Posted December 1, 2022 You are adding extra " ShellExecute("chrome.exe", "https://google.com --new-window --start-fullscreen") or Run("C:\Program Files\Google\Chrome\Application\chrome.exe") ? You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
stiv Posted December 1, 2022 Author Share Posted December 1, 2022 no, I just gave the example, with any of those two lines of code, the browser opens and closes instantly. Link to comment Share on other sites More sharing options...
SkysLastChance Posted December 1, 2022 Share Posted December 1, 2022 This only happens when you are opening with autoit? If you manually open it will it stay up? You could try. #RequireAdmin ShellExecute("chrome.exe", "https://google.com --new-window --start-fullscreen") You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott Link to comment Share on other sites More sharing options...
argumentum Posted December 2, 2022 Share Posted December 2, 2022 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. Link to comment Share on other sites More sharing options...
stiv Posted December 2, 2022 Author Share Posted December 2, 2022 Those codes work, however the problem is that it opens the browser, and immediately closes. on another computer if it works for me. but mine has this problem Link to comment Share on other sites More sharing options...
stiv Posted December 2, 2022 Author Share Posted December 2, 2022 @SkysLastChance Yes, this only happens when I'm opening with autoit and manual opens fine Link to comment Share on other sites More sharing options...
Nine Posted December 2, 2022 Share Posted December 2, 2022 I think there might be a security issue inside chrome. Look for it... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
stiv Posted December 2, 2022 Author Share Posted December 2, 2022 @NineI think the same, do you know what security problem it could be? Link to comment Share on other sites More sharing options...
Nine Posted December 2, 2022 Share Posted December 2, 2022 Not exactly. But there is some limitations in regards of automating Chrome. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
D3fr0s7 Posted December 2, 2022 Share Posted December 2, 2022 Do you have any popup blocking extensions perhaps? Link to comment Share on other sites More sharing options...
stiv Posted December 7, 2022 Author Share Posted December 7, 2022 Thanks everyone, however I created a .bat and wrote the path in the autoit code. Link to comment Share on other sites More sharing options...
Skysnake Posted December 14, 2022 Share Posted December 14, 2022 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 SkysLastChance and stiv 1 1 Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
stiv Posted December 19, 2022 Author Share Posted December 19, 2022 Thanks @Skysnake, it worked correctly. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now