Home | Contents | Index | Help | < Browse | Browse >
 -------------------------------------------------------------------------

 POPUP HIDE | STILL [time] | RMB | LMB | MMB | FIRST

 All the options (except FIRST) specifies different
 conditions. Selector waits until these conditions are true and
 then opens the window. The window is closed again when the
 mouse pointer has been over the window and moved out of
 the window again. All event commands are active
 as usual also when the window is closed in this way. But not if it's
 closed with the close gadget or by pressing ESC. Then selector
 terminates as usual. You can use the button/event commands
 options Popup and PopupClose to close and
 open the popup window. The window is updated every time it's
 opened as if the update option was used.
 
 
 'POPUP HIDE' makes the window to wait to open until you have
 the mouse pointer located where the window will be opened.
 
 'POPUP STILL' The window will not open until the mouse pointer
 is still. The additional [time] option specifies how long the
 mouse must be still for the window to open.
 Default is 0.2 seconds.
 
 'POPUP RMB' The window will not open until the Right Mouse
 Button is pressed.

   RMB = Right Mouse Button
   LMB = Left Mouse Button
   MMB = Middle Mouse Button (If you have a mouse with 3 buttons)
   
   These options are exclusive. This means that if you use
   the command 'POPUP LMB' then the window will popup when the
   left mouse button is pressed. But NOT if both mouse buttons
   are pressed. This is made so you can have several selectors
   running at the same time. Each opening a window on a
   specific button combination.

 The 'FIRST' option makes the window to open first time selector
 is started. For example: 'POPUP FIRST HIDE' opens the window
 right away. Then when it has been closed, it's opened again
 when the pointer is located where the window was located.
 
 
 'POPUP STILL 3 RMB LMB HIDE' Opens the window only when the
 mouse pointer is located where the window will be opened AND
 the right and left mouse buttons are pressed AND the mouse
 has been still for 3 seconds.


 Note:
   The popup command is only active on the screen the window is
   supposed to be opened on. Consider the folowing script:
 
     POPUP rmb lmb
     SCREEN Workbench
     TEXT Hello!

   Now, the window will only popup if you press both mouse buttons
   on the workbench screen. Not if you press both mouse buttons
   on any other screen.

 -------------------------------------------------------------------------

 Hidden Button panel

 The POPUP command combined with the screen command with the Jump option
 lets you make a powerful button panel that pops up on ALL screens,
 when you for example move the mouse to the bottom of the screen.
   
 Here is a example of such a panel:
   
	version 6

	popup hide still
	screen jump

	font helvetica 13 ordefault
	border off
	y 0 frommax
	background 3
	gap 1
	rows 1
	title off

	color 1 0
	button Shell 'newshell con:20/156/640/178'
	color 1 3
	button Workbench ScreenRun Workbench
	button DiskMaster ScreenRun DM 'dm2 sys:disk&fil/DiskMaster2'
	button Editor ScreenRun HBASIC.1 hbasic2:hbasic2
	color 1 0
	button DigiBooster run "Work:LJUD/Trackers/DigiBooster1.7_FULL"
	button Spela run 'selector spelavad'
	button Prefs run 'execute /prefs'
   

 Start it! (Press only once, the window is hidden...)
 
 ! When you have started it, move the mouse pointer to the bottom of the
 screen, but not in the corner. (In the bottom, but in the middle), and
 hold it still there. There it is!!! Try the different buttons !
 
 ! Go to another screen and try the same thing there !
 
 To get rid of the panel, activate it (like above) and press ESC.

 -------------------------------------------------------------------------

 Popup Menu

 Using one of the mouse button options (RMB, LMB etc.) combined with
 SCREEN JUMP, X AtPointer and Y AtPointer is probably a better
 alternative to the hidden panel above. Especially if you have a mouse
 with 3 buttons. Then you can use the MMB option to make a popup menu
 that pops up on all screens when pressing the middle button. The combined
 options RMB LMB (both mouse buttons) is the best alternative if you have a
 standard 2 button mouse. For minimum interference with other programs:
 hold down the right button, and then press the right one and release.
 BUT, if you are using MagicMenu, this won't work. Then you have to
 do it in the oposite order. First place the mouse somewhere where it
 doesn't matter if you press left button, then hold down left button,
 then press right button and release...
 
 Here is an example of such a popup menu:
 
	version 6

	popup rmb lmb
	screen jump
	y atpointer
	x atpointer

	font helvetica 13 ordefault
	border off
	title off
	background 3
	gap 1

	color 1 0
	button Shell 'newshell con:20/156/640/178'
	color 1 3
	button Workbench ScreenRun Workbench
	button DiskMaster ScreenRun DM 'dm2 sys:disk&fil/DiskMaster2'
	button Editor ScreenRun HBASIC.1 hbasic2:hbasic2
	color 1 0
	button DigiBooster run "Work:LJUD/Trackers/DigiBooster1.7_FULL"
	button Spela run 'selector spelavad' PopupClose
	button Prefs run 'execute /prefs' PopupClose
	
 Start it! (Press only once, the window is hidden...)
 
 Then press both mouse buttons to make it show. Go to another screen
 and try again!

 -------------------------------------------------------------------------

 Tips...

 There is nothing that prevents you from starting more than one selector
 using the POPUP command. Perhaps one universal popupmenu using:
 
   POPUP LMB RMB
   SCREEN JUMP
   X AtPointer
   Y AtPointer

 Then you can also have one selector started on each public screen with
 a button panel that is specific for that screens application. For example
 a button panel using:

   POPUP HIDE STILL
   SCREEN PUBNAME.1
   ROWS 1
   Y 0 FromMax
   
 containing some buttons for starting arexx macros for the program in
 question. Just make sure that the program is started before selector,
 else selector ends with the error message "Unknown PubScreen: PUBNAME.1".
 But you can prevent this by awaiting a screen. See below.
 
 Then when you have closed the screen (PUBNAME.1), the hidden selector
 ends automaticly. (After executing any specified OnExit commands). These
 screen checks are in 10 seconds intervals, so there can pass some seconds
 before selector ends.
 
 You can prevent the message "Unknown PubScreen: PUBNAME.1" to appear, by
 using 'SCREEN JUMP PUBNAME.1' instead. Then selector will only open
 the window on the screen PUBNAME.1 if it exists, else it will wait until
 it's opened. But this way, selector will not self-terminate when the
 screen is closed. It will wait until you open it again instead, and
 continue its actions there. So, if you wish, you can start several
 selectors in your startup, waiting for different screens to open and
 then open the window there.

 
 Awaiting a Screen
 
 Take a look at this script:
 
     screen jump [arg1]
     popup first

     onpopup load [arg2]
 
 Save this to a file called: await.sel
 This script solves the two problems above. Use it like this:
 
 Selector await SCREEN script
 
 Where "SCREEN" is the screen to await, and "script" is the selector
 script to open on the awaited screen.
  
 
 -------------------------------------------------------------------------


Home | Contents | Index | Help | < Browse | Browse >