Sign in to follow this  
Followers 0
litlmike

Simple One - GUI is Minimized

5 posts in this topic

For some crazy reason, I cannot figure this one out. When I HotKey the GUI, it GUICreates, but it is minimized even though I use GUISetState(@SW_SHOW). I even tried WinActivate with no luck. What am I missing here.

Thanks in Advance.

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

HotKeySet ("+!^l", "GUI_For_KeyWords")

Global $oIE, $string, $row, $Column, $aArray2, $s_Url, $i, $j, $oExcel
Global $avArray_keywords[1]

    While 1
        Sleep (2000)
    WEnd

Func GUI_For_KeyWords ()
    
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
$GUI_Win_Title = "Keyword Indexing and Accuracy Checker"
GUICreate($GUI_Win_Title, @DesktopWidth, @DesktopHeight, _
        0, 0, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$GUIActiveX = GUICtrlCreateObj($oIE, 10, 160, @DesktopWidth/1.325, @DesktopHeight/1.325)


#Region ### START Koda GUI section ### Form=c:\documents and settings\...
$Button1 = GUICtrlCreateButton("Open The Keyword Page", 10, 10, 219, 25, 0)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("GGN Link to Get Data From", 10, 50, 800, 20)
$Input2 = GUICtrlCreateInput("Use Current Page", 10, 80, 800, 20)
$Input3 = GUICtrlCreateInput("Enter A URL To Go To", 10, 110, 800, 20)
$Button6 = GUICtrlCreateButton("Go To, Then Index and Check", 820, 50, 150, 20, 0)
$Button7 = GUICtrlCreateButton("Index and Check Current Page", 820, 80, 150, 20, 0)
$Button8 = GUICtrlCreateButton("<==== Go to URL", 820, 110, 150, 20, 0)
GUISetState(@SW_SHOW)
WinSetState ($GUI_Win_Title,"", @SW_MAXIMIZE)

While 1
    $nMsg = GUIGetMsg()
    $Current_Url = _IEPropertyGet ( $oIE, "locationurl"); Get the Current Url

    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUISetState (@SW_HIDE)
            ExitLoop
        
        Case $Button6
            $sUrl = GUICtrlRead ($Input1)
            Grab_Index_Keywords ($sUrl)
            Check_Google_If_Keyword_Exists ()
        
        Case $Button7
            GUICtrlDelete ( $Input2 )
            $Input2 = GUICtrlCreateInput($Current_Url, 10, 80, 800, 20)
            $sUrl = GUICtrlRead ($Input2)
            Grab_Index_Keywords ($sUrl)
            Check_Google_If_Keyword_Exists ()
        
        Case $Button8
            _IENavigate ($oIE, GUICtrlRead ($Input3))
                        
    EndSwitch
WEnd
EndFunc

Share this post


Link to post
Share on other sites



Wow Mike a 4 finger (Salute) HotKeyCombo

Just for testing, change your hotkey to use a single key something like F2 etc.

I changed that in your code and it worked for me, Window maximised.

HardCopy


Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

Wow Mike a 4 finger (Salute) HotKeyCombo

Just for testing, change your hotkey to use a single key something like F2 etc.

I changed that in your code and it worked for me, Window maximised.

HardCopy

Changed the HotKey, but no dice, still doesn't work. I find that interesting that it works on your PC fine. Hmmm......

Share this post


Link to post
Share on other sites

Try adding:

WinActivate($GUI_Win_Title)

after your WinSetState.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

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