Sign in to follow this  
Followers 0
AzKay

How can I "Kill" a GUICtrlCreateObj()?

14 posts in this topic

I have a:

$ShellExplorer2 = ObjCreate("shell.explorer.2")

With a

GUICtrlCreateObj($ShellExplorer2, ...) ;; Not exact params. Lol.

Anyway, My next thing is something like

$ShellExplorer2.Navigate("javachat")

How would I "Kill" the whole thing without having to end my script? So that, there is not more object there atall, no chat, nothing. It would just be the blank GUI.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



I have a:

$ShellExplorer2 = ObjCreate("shell.explorer.2")

With a

GUICtrlCreateObj($ShellExplorer2, ...) ;; Not exact params. Lol.

Anyway, My next thing is something like

$ShellExplorer2.Navigate("javachat")

How would I "Kill" the whole thing without having to end my script? So that, there is not more object there atall, no chat, nothing. It would just be the blank GUI.

If you did somethingh like

$ShellExplorer2 = ObjCreate("")

then maybe this would be a way of destroying the Object. It might be bad so don't trust me. You would then have to check that the value of $ShellExplorer2 was not 0 before you tried to execute any more functions with it, and you would have to clear the area that had been drawn yourself.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#include <IE.au3>
$oIE  = _IECreate ("http://sourceforge.net", 0, 0)
; Display the innerText on an element on the  page with a name of "sfmarquee"
$oMarquee = _IEGetObjByName  ($oIE, "sfmarquee")
MsgBox(0, "SourceForge Information",  $oMarquee.innerText)
_IEQuit  ($oIE)

just look at _IECreate(() in help...

it has a reference to _IEQuit()

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Im not using IE* functions though.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Im not using IE* functions though.

sorry... but

it has this

$o_object.quit ()
    $o_object = 0
    Return 1

$ShellExplorer2 = ""

should work...

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Object variables behave a bit different than other types of AutoIt variables. An Object is not a real value, but a 'pointer' to something outside the script. So you can't perform arithmetic's, nor equations on Object variables. When you assign an Object variable a different value, the 'pointer' will automatically be released. You can, for instance, force deletion of an Object by assigning it any number or any text value.

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")  ; Object is created
$oHTTP=0                                          ; Object is deleted

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Share this post


Link to post
Share on other sites

sorry... but

it has this

$o_object.quit ()
    $o_object = 0
    Return 1

$ShellExplorer2 = ""

should work...

8)

Ah yes, But = "", doesnt work. Tryed it :P

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

$ChatObj.quit gives me an error

$ChatObj = 0 or = "" doesnt do anything


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

try

If IsObj($ChatObj) Then $ChatObj.quit ()

8)

Same error

C:\Documents and Settings\Asus\Desktop\ROToolbox\ROToolbox.au3 (167) : ==> The requested action with this object has failed.:

If IsObj($ChatObj) Then $ChatObj.quit ()

If IsObj($ChatObj) Then $ChatObj.quit ()^ ERROR


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I just looked at Shell.Explorer.2 in the OLE/COM Object Viewer. And, Theres no quit, or any function close to it available for Shell.Explorer.2


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I just looked at Shell.Explorer.2 in the OLE/COM Object Viewer. And, Theres no quit, or any function close to it available for Shell.Explorer.2

Did you try my suggestion (a few posts ago)?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Didnt work.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Didnt work.

By didn't work do you mean you got errors? or do you mean something else?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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
Sign in to follow this  
Followers 0