Sign in to follow this  
Followers 0
Warmonger

Closing A ShellExecute Process

9 posts in this topic

I built a launcher that uses ShellExecute() to load a hidden web page, with the users default browser. The problem im having is since it doesn't return the process handle or nothing. We end up with a process idling in the background. Is there any way to return a handle and close this process that would work on a global scale across all web browsers?

Share this post


Link to post
Share on other sites



Warmonger,

You could use ProcessList before and after the ShellExecute and see what started in the interval. :huh2:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Warmonger,

You could use ProcessList before and after the ShellExecute and see what started in the interval. :huh2:

M23

Would work. But wont meet my requirements. This program will be used by 1,000's of people daily for a official game, with all different kinds of browsers, so it needs to be more robust.

;~ Load Web Page
$Shell = ObjCreate('Shell.Application')
$Shell.ShellExecute('http://www.google.com', '', '', '', @SW_HIDE)

And then doing.

$Shell.Quit

And

$Shell = 0

But no success, process still exists maybe im doing something wrong?

Edited by Warmonger

Share this post


Link to post
Share on other sites

You were doing ok right up until that post

http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

The rule is that Gaming can not be discussed. Period.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

The rule is that Gaming can not be discussed. Period.

I'm not discussing gaming, am i? No. I would suggest check yourself real quick.

Share this post


Link to post
Share on other sites

This program will be used by 1,000's of people daily for a official game.

Unluckily for you I managed to have saved that before you edited the post.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Unluckily for you I managed to have saved that before you edited the post.

You keep failing over and over again. This is NOT for automating a game. So it breaks none of the rules.

Share this post


Link to post
Share on other sites

You keep failing over and over again. This is NOT for automating a game. So it breaks none of the rules.

Clear enough for me ... and thanks for reporting this thread twice to attract our attention.

*click*


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0