Discussion:
Floating Toolbar
Gert Scheepers
2007-10-02 13:41:39 UTC
Permalink
I am trying to write a toolbar for an application and I want it to stick to
the specific application, thus minimize or hide when app not active and only
be visible on this one app.



Tied to find something in the example scripts in the forum but no luck. Any
ideas?



Gerry



[Non-text portions of this message have been removed]
larrydalooza
2007-10-02 15:08:09 UTC
Permalink
Post by Gert Scheepers
I am trying to write a toolbar for an application and I want it to stick to
the specific application, thus minimize or hide when app not active and only
be visible on this one app.
Define "stick"...

Lar.
Gert Scheepers
2007-10-03 06:40:49 UTC
Permalink
Hi Larry



I want the toolbar to only float above a specific application and not float
on top of any other apps.

I seem to get it right but after minimizing the app and restoring use the
toolbar does not return with the app.



Gert



_____

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of larrydalooza
Sent: 02 October 2007 17:08 PM
To: ***@yahoogroups.com
Subject: [AutoIt] Re: Floating Toolbar
Post by Gert Scheepers
I am trying to write a toolbar for an application and I want it to stick to
the specific application, thus minimize or hide when app not active and only
be visible on this one app.
Define "stick"...

Lar.





[Non-text portions of this message have been removed]
Petr Dyntar
2007-10-03 08:30:40 UTC
Permalink
Here i got some kind of "toolbar"
its checking if "winexists",if true,it shows toolbar gui,if false,gui is hidden
looking for something like that?
;----------------------------------------------------------------------------------------
#include <GUIConstants.au3>
HotKeySet ("{ESC}", "esc")
Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced
$Ca = GUICreate("", 500, 20, 300, 10, $WS_POPUP,$WS_EX_WINDOWEDGE + $WS_EX_DLGMODALFRAME)
GUISetBkColor(0x11BBFF, $Ca)
GUICtrlCreateGraphic(15, 25, 150, 90, $SS_SUNKEN)
GUICtrlSetColor(-1, 0x11BBFF)
$fst1_button=GUICtrlCreateButton ( "fst1",5,3,30,15,)
GUICtrlSetOnEvent (-1, "fst1_pressed")
GUICtrlSetFont($Ca, "12", "50", "", "Palatino LinoType Bold")
GUICtrlSetFont($fst1_button, "10", "50", "", "Palatino LinoType Bold")
GUICtrlSetColor($fst1_button, 0x11BBFF)


While 10
call ("check")
Wend

Func fst1_pressed ()
WinActivate("Reflection X Root Window", "")
send ("ssh fczpcgfst1")
EndFunc
func check ()
if WinExists ("Microsoft PowerPoint - [SFC_to_eRMA_Upload_v2]") then
GUISetState(@SW_SHOW)
else
GUISetState(@SW_HIDE)
endif
endfunc

func esc ()
Exit
endfunc



-----Original Message-----
From: ***@yahoogroups.com [mailto:***@yahoogroups.com]On Behalf Of Gert Scheepers
Sent: Wednesday, October 03, 2007 8:41 AM
To: ***@yahoogroups.com
Subject: [Disarmed] RE: [AutoIt] Re: Floating Toolbar



Hi Larry

I want the toolbar to only float above a specific application and not float
on top of any other apps.

I seem to get it right but after minimizing the app and restoring use the
toolbar does not return with the app.

Gert

_____

From: ***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com [mailto: ***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com] On
Behalf Of larrydalooza
Sent: 02 October 2007 17:08 PM
To: ***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com
Subject: [AutoIt] Re: Floating Toolbar
Post by Gert Scheepers
I am trying to write a toolbar for an application and I want it to stick to
the specific application, thus minimize or hide when app not active and only
be visible on this one app.
Define "stick"...

Lar.

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
larrydalooza
2007-10-03 14:30:43 UTC
Permalink
Post by Gert Scheepers
I want the toolbar to only float above a specific application and not float
on top of any other apps.
I seem to get it right but after minimizing the app and restoring use the
toolbar does not return with the app.
does this get you started?

#include <GUIConstants.au3>

Run("calc")
WinWait("Calculator")
$hwnd = WinGetHandle("Calculator")

$pos = WinGetPos($hwnd)

$toolbar =
GUICreate("tools",300,25,$pos+10,$pos+60,$WS_CAPTION,$WS_EX_TOOLWINDOW,$hwnd)

GUISetState()

While WinExists($hwnd)
IF GUIGetMsg() = -3 Then Exit
WEnd
Gert Scheepers
2007-10-04 09:03:55 UTC
Permalink
Hi all



Thanks to all those who responded, I appreciate it.



I have used a bit of Larry's and Petr's script and added it in to mine. I
think the results is quite satisfactory.



Here is the result in case anyone else want to look at it.



;---------------------------------------------------



#include <GUIConstants.au3>



Run(@ScriptDir & "\TurboRisk.exe")

WinWait("TurboRisk","")

$hwnd = WinGetHandle("TurboRisk")



$pos = WinGetPos($hwnd)

$toolbar = GUICreate("", 104, 16, $pos[0] + $pos[2] - 114, $pos[1] + 30,
$WS_POPUP,$WS_EX_WINDOWEDGE + $WS_EX_DLGMODALFRAME, $hwnd)

$ButtonDone = GUICtrlCreateButton("Done", 0, 0, 38, 15, 0)

$Button5 = GUICtrlCreateButton("5", 38, 0, 22, 15, 0)

$Button10 = GUICtrlCreateButton("10", 60, 0, 22, 15, 0)

$Button15 = GUICtrlCreateButton("15", 82, 0, 22, 15, 0)

GUISetState()



While WinExists($hwnd)

$nMsg = GUIGetMsg()

$pos = WinGetPos($hwnd)

WinMove ( "", "Done", $pos[0] + $pos[2] - 114 , $pos[1] + 30)

Switch $nMsg

Case $GUI_EVENT_CLOSE

WinClose("TurboRisk","")

Exit

Case $ButtonDone

WinWait("TurboRisk","")

If Not WinActive("TurboRisk","") Then
WinActivate("TurboRisk","")

WinWaitActive("TurboRisk","")

Send("{Space}")

Case $Button5

WinWaitActive("TurboRisk","")

$pos = MouseGetPos()

MouseClick("", $pos[0], $pos[1],4)

Case $Button10

WinWaitActive("TurboRisk","")

$pos = MouseGetPos()

MouseClick("", $pos[0], $pos[1],9)

Case $Button15

WinWaitActive("TurboRisk","")

$pos = MouseGetPos()

MouseClick("", $pos[0], $pos[1],14)

EndSwitch

Wend



;---------------------------------------------------



Gert



_____

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of larrydalooza
Sent: 03 October 2007 16:31 PM
To: ***@yahoogroups.com
Subject: [AutoIt] Re: Floating Toolbar
Post by Gert Scheepers
I want the toolbar to only float above a specific application and not float
on top of any other apps.
I seem to get it right but after minimizing the app and restoring use the
toolbar does not return with the app.
does this get you started?

#include <GUIConstants.au3>

Run("calc")
WinWait("Calculator")
$hwnd = WinGetHandle("Calculator")

$pos = WinGetPos($hwnd)

$toolbar =
GUICreate("tools",300,25,$pos+10,$pos+60,$WS_CAPTION,$WS_EX_TOOLWINDOW,$hwnd
)

GUISetState()

While WinExists($hwnd)
IF GUIGetMsg() = -3 Then Exit
WEnd





[Non-text portions of this message have been removed]
Steve Fisher
2007-10-06 10:33:43 UTC
Permalink
I had a little play with this at work, haven't got turborisk so
substituted notepad. It worked sort of but the toolbar was hidden by
the notepad window and I could not see it until I dragged the notepad
window (the toolbar then of course follows and re-hides itself). Any
ideas how to fix this?

Steve

Jackson
2007-10-03 18:41:20 UTC
Permalink
In the Example Scripts Forum search for "anygui"
or go to http://www.autoitscript.com/forum/index.php?showtopic=9517

It does not create toolbar, but is "For those of you who like to
manipulate other program windows", so I think you can use it.
I'm not an expert, I'm just trying to help.

Ciao. J.
�I am trying to write a toolbar for an application and I want it to stick to
�the specific application, thus minimize or hide when app not active and only
�be visible on this one app.
�Tied to find something in the example scripts in the forum but no luck. Any
�ideas?
�Gerry
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AutoItList/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/AutoItList/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:AutoItList-***@yahoogroups.com
mailto:AutoItList-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Loading...