Jump to content

Pal, Peter's AutoIt functions Library


PeterVerbeek
 Share

Recommended Posts

10 hours ago, Werty said:

I usually just right-click the taskbar and choose "Cascade windows", then it comes back to primary monitor.

Yes, that's neat but this function is meant for multi-GUI apps like Peace equalizer for instance. In this app most gui's are closed and not even created. So I use _WindowForceToPrimaryMonitor() to get the opened/created GUI on the primary monitor if other monitors are off/disconnected.

Edited by PeterVerbeek

Creator of the Peace equalizer, an interface for Equalizer APO. Besides Peace, my library of functions is also available on SourceForge.

Link to comment
Share on other sites

Version 1.25 released, New is _GUIResize() to resize according to the size given in GUICreate() which is the client size of a window. An absolute or delta (relative) size can be given. Also new are _IsBit() for testing a bit and _BitSet() for setting/unsetting a bit. Also new: _Decimals() returns the decimal part (after the point) of a number.

Creator of the Peace equalizer, an interface for Equalizer APO. Besides Peace, my library of functions is also available on SourceForge.

Link to comment
Share on other sites

By using the new numberbox library of PAL version 1.27 an input control can be limited to integers, reals, hexadecimals or bits. Examples:

 

_GUICtrlNumberBox_Create("999", 7, 0, 0, 100, 25)
GUICtrlSetTip(-1, "Format 999: Positive integer of maximum length of 3")

_GUICtrlNumberBox_Create("-9.999", -3.141, 0, 0, 100, 25)
GUICtrlSetTip(-1, "Format -9.999: Positive/negative real of length 1 before decimal point and length 3 after")

$nNumberBox = GUICtrlCreateInput("123", 0, 0, 100, 25)
_NumberBoxAdd($nNumberBox,"999")
GUICtrlSetTip(-1,"The 999 number format is added later on to this standard input box")

$nBinaryBox = _GUICtrlNumberBox_Create("b10000000", "01010101", 0, 0, 100, 25)
GUICtrlSetTip(-1,"Binary format b10000000: 8 bits, maximum of 128 decimal")

$nOffSetY += $nNumberBoxHeight+5 $nHexaBox = _GUICtrlNumberBox_Create("h8000", "0000", 0, 0, 100,25)
GUICtrlSetTip(-1,"Hexadecimal format h8000: maximum of 8000 hexadecimal")

For this you need to register the numberbox handler, some like so:

_NumberBoxRegister()
GUISetState(@SW_SHOW,$hGUI)
While 1
  $aMsg = GUIGetMsg(1)
  Switch $aMsg[0]
      Case $GUI_EVENT_CLOSE ExitLoop
  EndSwitch
WEnd
_NumberBoxRegister($NB_UNREGISTER) 
GUIDelete($hGUI)

Or add the following to your existing handler:

Func MyHandler($hWnd, $iMsg, $wParam, $lParam)
   ....
   _NumberBoxHandler($hWnd, $iMsg, $wParam, $lParam)
   ....
EndFunc

As usual the new functions are described in the PAL manual, see files on website.

Creator of the Peace equalizer, an interface for Equalizer APO. Besides Peace, my library of functions is also available on SourceForge.

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

×
×
  • Create New...