Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/29/2014 in all areas

  1. Mobius

    Programmers Suck!

    @OP, dude you've some seriously "new shoes" to bring this here. On a lighter note that must have been quite a program to tug your beloved from your bulging arms *cough*, what's her email? There are some people with decent skill sets here that might be interested in a lass that can appreciate their work. Maybe a competition is in order.
    2 points
  2. Decent effort. See if you understand what's going on here with a few mods to your own code. Global $firstrun = 1, $ran = 0 HotKeySet("\", "Click1") HotKeySet("]", "Click2") While 1 Sleep(100) WEnd Func Click1() If $firstrun = 1 Then $firstrun = 0 $ran += 1 ;Your Code or func Click1Func() ElseIf $ran > 0 Then ;Your Code or func Click1Func() EndIf EndFunc ;==>Click1 Func Click2() If $firstrun = 1 Then $firstrun = 0 $ran += 1 ;Your Code or func Click2Func() ElseIf $ran > 0 Then ;Your Code or func Click2Func() EndIf EndFunc ;==>Click2 Func Click2Func() MsgBox(0, "Click2", "Click2Func") EndFunc ;==>Click2Func Func Click1Func() MsgBox(0, "Click1", "Click1Func") EndFunc ;==>Click2Func
    1 point
  3. TechCoder

    Programmers Suck!

    sounds more like most of the programmers I know.......
    1 point
  4. Have you ever wondered how do I create a GUI like the one shown below?! Then look no further with these Examples. I was playing around with $WS_DLGFRAME and figured that if I BitOR'd it with $WS_SIZEBOX it would create a GUI without the minimize and maximize, but what if I didn't want the re-sizing? After some playing around I realised that replacing $WS_SIZEBOX with $WS_SYSMENU would accomplish this instead of using WM_COMMAND to intercept SC_SIZE from the GUI. Then ?do=embed' frameborder='0' data-embedContent> pointed out it could be done via a different approach, so I updated using his way Examples below are for both re-sizing and non re-sizing as well as 2 Examples that don't appear in the TaskBar, this is due to using the hidden window [AutoItWinGetTitle()] as the parent handle. Any suggestions, then please post below. Thanks. Examples: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example1() ; Without Re-Sizing. Example2() ; With Re-Sizing. Example3() ; Without Re-Sizing & No TaskBar. Example4() ; With Re-Sizing & No TaskBar. Func Example1() ; Without Re-Sizing. Local $hGUI = GUICreate('GUI With Only Close', 250, 250, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example1 Func Example2() ; With Re-Sizing. Local $hGUI = GUICreate('GUI With Only Close', 250, 250, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MINIMIZEBOX)) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example2 Func Example3() ; Without Re-Sizing & No TaskBar. Local $hGUI = GUICreate('GUI With Only Close', 250, 250, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX), -1, WinGetHandle(AutoItWinGetTitle())) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example3 Func Example4() ; With Re-Sizing & No TaskBar. Local $hGUI = GUICreate('GUI With Only Close', 250, 250, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MINIMIZEBOX), -1, WinGetHandle(AutoItWinGetTitle())) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example4Old way I was doing it: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example5() ; Old Way Of Doing It! Func Example5() ; Old Way Of Doing It! Local $hGUI = GUICreate('GUI With Only Close', 250, 250, -1, -1, BitOR($WS_SIZEBOX, $WS_DLGFRAME)) GUIRegisterMsg($WM_SYSCOMMAND, 'WM_SYSCOMMAND') GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example5 Func WM_SYSCOMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $ilParam Local Const $SC_MAXIMIZE = 0xF030, $SC_MINIMIZE = 0xF020, $SC_RESTORE = 0xF120, $SC_SIZE = 0xF000 ; $SC_MOVE = 0xF010 Switch BitAND($iwParam, 0xFFF0) Case $SC_MAXIMIZE, $SC_MINIMIZE, $SC_RESTORE, $SC_SIZE Return -1 EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_SYSCOMMAND ?do=embed' frameborder='0' data-embedContent>
    1 point
×
×
  • Create New...