Sign in to follow this  
Followers 0
Heroic

_IECreate not working.

4 posts in this topic

Hi. I'm trying to get a MsgBox function to work the way i want it.

Here some of my script perhaps it might speak more than i type.

#include <IE.au3>
#include <GUIConstants.au3>

$s_URL = "http://www.google.com"

While 1
    $nMsg = GUIGetMsg()
Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $close1
            Exit
        Case $about1
            MsgBox(33, "About", "About box full of lines :)" & @CRLF & @CRLF & "See what i told ya :P")
        Case $madeby        
            MsgBox(1, "WARNING", "Have a nice day :D")
    Switch $madeby
        Case 1
            _IECreate($s_URL)
        Case 2
            Exit
    EndSwitch
EndSwitch

WEnd

When i click OK, Internet Explorer no open.

There is alot of GUI with it to. But i only work slowly to get functions working.

Help me please, it might be a small error but i cannot see what is wrong.

Share this post


Link to post
Share on other sites



Use SciTe debug mode in your code to insure you are getting the execution flow you expect (see my sig).

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi. I'm trying to get a MsgBox function to work the way i want it.

Here some of my script perhaps it might speak more than i type.

#include <IE.au3>
#include <GUIConstants.au3>

$s_URL = "http://www.google.com"

While 1
    $nMsg = GUIGetMsg()
Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $close1
            Exit
        Case $about1
            MsgBox(33, "About", "About box full of lines :)" & @CRLF & @CRLF & "See what i told ya :P")
        Case $madeby        
            MsgBox(1, "WARNING", "Have a nice day :D")
    Switch $madeby
        Case 1
            _IECreate($s_URL)
        Case 2
            Exit
    EndSwitch
EndSwitch

WEnd

When i click OK, Internet Explorer no open.

There is alot of GUI with it to. But i only work slowly to get functions working.

Help me please, it might be a small error but i cannot see what is wrong.

You need to give us a bit more to work on; what are the variables $madeby, $close1 etc

You have a Case $madeby so I assume $madeby is some control you have created, in which case it will never have the value 1 or 2 so the 'switch $madeby' will never do anything.

If you have a button which you want to click to open an IE window why don't you just have

Case $ButtonToOpenIE

_IECreate($s_URL)

Edited by martin

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

#4 ·  Posted (edited)

You need to give us a bit more to work on; what are the variables $madeby, $close1 etc

You have a Case $madeby so I assume $madeby is some control you have created, in which case it will never have the value 1 or 2 so the 'switch $madeby' will never do anything.

If you have a button which you want to click to open an IE window why don't you just have

Case $ButtonToOpenIE

_IECreate($s_URL)

BE WARNED, LOTS OF TEXT

#include <GUIConstants.au3>
#include <IE.au3>

#Region ### START Koda GUI section ### Form=c:\program files\autoit3\scite\koda\forms\wow keyboard.kxf
$Body = GUICreate("WoW Keyboard", 737, 264, 554, 527, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
$passinput = GUICtrlCreateInput("Password displays here.", 24, 16, 697, 25, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_READONLY, $WS_BORDER))
GUICtrlSetFont(-1, 8, 800, 0, "Segoe UI")
GUICtrlSetBkColor(-1, 0xB9D1EA)
GUICtrlSetCursor(-1, 5)
$noedit = GUICtrlCreateLabel("You cannot edit this box or type in it.", 272, 40, 219, 21, $WS_BORDER)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num1 = GUICtrlCreateButton("1", 24, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num2 = GUICtrlCreateButton("2", 80, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num3 = GUICtrlCreateButton("3", 136, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num4 = GUICtrlCreateButton("4", 192, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num5 = GUICtrlCreateButton("5", 248, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num6 = GUICtrlCreateButton("6", 304, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num7 = GUICtrlCreateButton("7", 360, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num8 = GUICtrlCreateButton("8", 416, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num9 = GUICtrlCreateButton("9", 472, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$num0 = GUICtrlCreateButton("0", 528, 72, 49, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$clearpws = GUICtrlCreateButton("Clear Password", 584, 72, 137, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettQ = GUICtrlCreateButton("Q", 56, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettW = GUICtrlCreateButton("W", 112, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettE = GUICtrlCreateButton("E", 168, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettR = GUICtrlCreateButton("R", 224, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettT = GUICtrlCreateButton("T", 280, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettY = GUICtrlCreateButton("Y", 336, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettU = GUICtrlCreateButton("U", 392, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettI = GUICtrlCreateButton("I", 448, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettO = GUICtrlCreateButton("O", 504, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettP = GUICtrlCreateButton("P", 560, 104, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettA = GUICtrlCreateButton("A", 80, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettS = GUICtrlCreateButton("S", 136, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettD = GUICtrlCreateButton("D", 192, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettF = GUICtrlCreateButton("F", 248, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettG = GUICtrlCreateButton("G", 304, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettH = GUICtrlCreateButton("H", 360, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettJ = GUICtrlCreateButton("J", 416, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettK = GUICtrlCreateButton("K", 472, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettL = GUICtrlCreateButton("L", 528, 136, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettZ = GUICtrlCreateButton("Z", 112, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettX = GUICtrlCreateButton("X", 168, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettC = GUICtrlCreateButton("C", 224, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettV = GUICtrlCreateButton("V", 280, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettB = GUICtrlCreateButton("B", 336, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettN = GUICtrlCreateButton("N", 392, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lettM = GUICtrlCreateButton("M", 448, 168, 41, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$lowercase = GUICtrlCreateButton("Lower Case", 616, 104, 105, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$alphaBtn = GUICtrlCreateLabel("Alphabetic Order Keyboard", 560, 200, 165, 21)
GUICtrlSetFont(-1, 8, 400, 4, "Segoe UI")
GUICtrlSetColor(-1, 0x3399FF)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetCursor(-1, 2)
$madeby = GUICtrlCreateLabel("Made by Likoa - Wildhammer", 240, 208, 161, 19)
GUICtrlSetFont(-1, 7, 400, 0, "Segoe UI")
GUICtrlSetCursor(-1, 0)
$Label1 = GUICtrlCreateLabel("v1.1001", 672, 216, 48, 21)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$send = GUICtrlCreateButton("Send", 512, 168, 217, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI")
$file1 = GUICtrlCreateMenu("File")
$about1 = GUICtrlCreateMenuItem("About", $file1)
$close1 = GUICtrlCreateMenuItem("Close", $file1)
GUISetState(@SW_SHOW)
$s_URL = "http://eu.wowarmory.com/character-sheet.xml?r=Wildhammer&n=Likoa"
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $close1
            Exit
        Case $about1
            MsgBox(33, "About", "About box full of lines :)" & @CRLF & @CRLF & "See what i told ya :P")
        Case $madeby        
            MsgBox(1, "WARNING", "By clicking okay, your computer will open 'Internet Explorer' and this causes WoW Keyboard not to close down properly by pressing the red X or close tab found in File Menu" & @CRLF & @CRLF & "Are you sure you want to continue?")
    Switch $madeby
        Case 1
            _IECreate($s_URL)
        Case 2
            Exit
    EndSwitch
EndSwitch

WEnd

Where it says, Password will be displayed is not a keylogger or keylogging program! It will simply just quick launch your wow and type the password displayed on the program. But still if this program doesn't work i can still use half the script for something else :). Will be making the program read the displayed features and keybindings so you can reconfigure them for your liking. But still lots of work to do. :P

Edited by Heroic

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