Jump to content

Hiding an object


bundyxc
 Share

Recommended Posts

My code is as follows:

$object = ObjCreate("Shell.Explorer.2")
$object_control = GUICtrlCreateObj($object, 16, 10, 240, 150)

Simple, right? Well, I don't want to see my embedded IE window! I want to automate a few web tasks, without having to actually see the browser do it. Is this possible? I've looked in the helpfile for options in GUICtrlCreateObj(), but couldn't find anything useful. Thanks for your time!

Edited by bundyxc
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

GuiSetState(@SW_HIDE, $log) ???

but i am not sure in Obj :) for Inputs i used Guidelete :)

I don't ever need it to be displayed, so deleting it would be pointless. I'd like it to just not show up in the first place, but if I create the object (without making it show up in my GUI), then it shoots me this error:

C:\Program Files\AutoIt3\Include\IE.au3 (316) : ==> The requested action with this object has failed.:
$o_object.navigate($s_Url)
$o_object.navigate($s_Url)^ ERROR
>Exit code: 1    Time: 0.340

And uhh.. GUISetState() controls the entire GUI, not solely one object inside of it. Thanks anyway. Any other suggestions?

Here's the full code, as of now:

#include <GUIConstants.au3>
#include <IE.au3>
#include <UnixTime.au3>
#Include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <String.au3>
#RequireAdmin
#NoTrayIcon
Opt("TrayMenuMode",1)

_IELoadWaitTimeout (30000)
$text = 'Ready'
$progressbar = 0



$GUI = GUICreate("PureStatus - PureAdds.com", 528, 210)
$object = ObjCreate("Shell.Explorer.2")
$log = GUICtrlCreateObj($object, 16, 10, 240, 150, 0x0800)
$start_stop_button = GUICtrlCreateButton("Start", 264, 10, 240, 30)
$accounts_button = GUICtrlCreateButton("Accounts", 264, 50, 240, 30)
$statuses_button = GUICtrlCreateButton("Statuses", 264, 90, 240, 30)
$settings_button = GUICtrlCreateButton("Settings", 264, 130, 240, 30)
$progress = GuiCtrlCreateProgress(16, 170, 496, 30)
GuiCtrlSetData($progress, $progressbar)
_IENavigate($object, "http://google.com")

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
        
    EndSelect
WEnd
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

I don't ever need it to be displayed,...

If you don't ever need it to be displayed then why create it where it will be displayed?

$log = GUICtrlCreateObj($object, 500, 10, 240, 150)

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.
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...