Jump to content

lowbred

Active Members
  • Posts

    20
  • Joined

  • Last visited

lowbred's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Yes sir... That it does wonderfully.
  2. Could someone please explain what's up? I'm making a launcher for DOSBox. The script will place two buttons on the titlebar. One that shows/hides the console window and the other to paste text into DOSBox. I have replaced the default icon group in dosbox.exe, leaving the default 16x16. I want to keep the default 16x16 for list, details view in explorer and titlebars. When I launch DOSBox my new icon is on the taskbar. The problem is when I hide/show the console window the taskbar icon changes from my new icon (I believe the taskbar uses 32x32 icon by default) to the 16x16. The console window does use the 16x16 on the titlebar. The examples below are basic examples of what's happening. ShellExecute("dosbox.exe", "-noconsole") default 16x16 icon on taskbar ShellExecute("dosbox.exe") new 32x32 on taskbar Run("dosbox.exe -noconsole") default 16x16 icon on taskbar Run("dosbox.exe") new 32x32 on taskbar How can I stop this from happening? or How could I refresh the taskbar after hiding/showing the console window to have the 32x32 icon again?
  3. boththose, thanks for lookin' out for me but I got it. RunWait(@ComSpec & ' "/c" "schtasks" "/create" "/tn" "Mytask-' & @UserName & '" "/tr" """' & FileGetShortName(@ScriptFullPath) & '""" "/sc" "ONLOGON" "/ru" "' & @UserName & '" "/it" "/rl" "HIGHEST"', @SystemDir, @SW_HIDE)
  4. I can't seem to figure out how to encapsulate the file path... Help pls. RunWait(@ComSpec & ' "/c" "schtasks" "/create" "/tn" "Mytask-' & @UserName & '" "/tr" "' & FileGetShortName(@ScriptFullPath) & '" "/sc" "ONLOGON" "/ru" "' & @UserName & '" "/it" "/rl" "HIGHEST"', @SystemDir, @SW_HIDE)
  5. I'm testing with a homegrown app but it's for my wife's boss. It's for a restaurant menu interface.
  6. It's company software, it's just lacking the good old company logo.
  7. I'm trying to overlay a company logo to external software. I can get the logo to appear and stay where I want it in fullscreen but when the program window is resized the logo disappears. I tried implementing a number of script examples by UEZ with no luck. If I placed the logo on the left side of the program window it stays in place no matter what the window size. I need it to be on the right side of the window. #include <GDIPlus.au3> #include <GuiConstantsEx.au3> Global $hGUI, $hImage, $hGraphic WinWait("[CLASS:Waltec]", "", 10) $hGUI = WinGetHandle("[CLASS:Waltec]") _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile("C:\Users\lowbred\Desktop\logo.png") $hImage_new = _GDIPlus_ImageResize($hImage, 155, 26) Do $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage_new, 1109, 39) ;8px offset with x, 9px offset with y and idk why? If Not ProcessExists("Waltec.exe") Then Exit EndIf Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_ImageDispose($hImage) _GDIPlus_ImageDispose($hImage_new) _GDIPlus_ShutDown()
  8. Thanks Zedna but I was hoping for for the menu not to be there at all... Just gone... Destroyed completely. Also, I would like to keep the functionality of the buttons.
  9. AutoIt GUI, also being able to keep the default window border.
  10. Is there a way to disable the window menu (restore, move, resize, minimize, maximize, close). I have read in the forum and seen examples of completely removing the title bar icon but I would like to keep the icon but have no menu.
  11. Thought i had it
  12. You MVP's are gonna look at this and say to yourself, "Ah... Yeah, OK" but it's definitely working. Criticism and pointers are welcome. This is the best I could come up with to accomplish the functionality I initially hoped for... Well, about 98% of the functionality. There are two issues I would like to address, I'm sure I understand why they happen... Do...Until. 1. The GUI's window menu (restore, move, resize, minimize, maximize, close) appears just above the taskbar when button1 is "enabled" and the GUI is minimized. 2. When button1 is "enabled" the window close button does not work. This is my first GUI ever and it will be nothing more than an autotyper. I'm calling it "AutoIType", how original, eh? I will be using it with my HEX editor, Word and I'm sure I will find other useful implications. Overall, I'm happy thus far with it but like i said, criticism and pointers are welcome. #include <GUIConstantsEx.au3> #include <ColorConstants.au3> #include <WindowsConstants.au3> #include <GUICtrlOnHover.au3> #include <GDIPlus.au3> #include <SendMessage.au3> _GDIPlus_Startup() HotKeySet("{ESC}", "On_Exit") Global Const $SC_DRAGMOVE = 0xF012 Local $hGUI = GUICreate("AutoIType", 500, 250) GUICtrlCreatePic("background.jpg", 0, 0, 0, 0) GUICtrlSetState(-1, $GUI_DISABLE) $Button1 = GUICtrlCreatePic('', 0, 0, 142, 62) _GUICtrl_OnHoverRegister(-1, "_Hover_Proc", "_Leave_Hover_Proc", "PrimaryDown_Proc", "PrimaryUp_Proc") SendImageToPicControl("normal_1.png", $Button1) $Button2 = GUICtrlCreatePic('', 0, 80, 142, 62) _GUICtrl_OnHoverRegister(-1, "_Hover_Proc", "_Leave_Hover_Proc", "PrimaryDown_Proc", "PrimaryUp_Proc") SendImageToPicControl("normal_1.png", $Button2) Local $sFont = "Comic Sans MS" GUISetFont(9, 400, "", $sFont) GUICtrlSetDefColor($COLOR_White) Local $idLabel = GUICtrlCreateLabel("PNG = 1", 250, 40) GUICtrlSetBkColor($idLabel, $GUI_BKCOLOR_TRANSPARENT) ;GUICtrlSetColor($idLabel, $COLOR_RED) Local $idLabel = GUICtrlCreateLabel("JPG = 2", 250, 60) GUICtrlSetBkColor($idLabel, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_COMMAND, "Killswitch") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ;, $Button3 ExitLoop Case $GUI_EVENT_PRIMARYDOWN _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $Button1 HotKeySet("{1}", "sendit") HotKeySet("{2}", "sendit2") Do _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ;Sleep(25) SendImageToPicControl("enabled_1.png", $Button1) Until GUIGetMsg() = $Button1 SendImageToPicControl("normal_1.png", $Button1) HotKeySet("{1}") HotKeySet("{2}") EndSwitch WEnd _GDIPlus_Shutdown() GUIDelete($hGUI) Func On_Exit() Exit EndFunc ;==>On_Exit Func sendit() Send(".png") EndFunc ;==>sendit Func sendit2() Send(".jpg") EndFunc ;==>sendit2 Func Killswitch($hWnd, $Msg, $wParam, $lParam) Switch BitAND($wParam, 0x0000FFFF) Case $Button2 Sleep(300) Exit EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>Killswitch Func SendImageToPicControl($sImage, $iCtrlID) Local Const $hImage = _GDIPlus_ImageLoadFromFile($sImage) Local Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($iCtrlID, 0x0172, $IMAGE_BITMAP, $hHBitmap)) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_ImageDispose($hImage) EndFunc ;==>SendImageToPicControl Func _Hover_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("hover_1.png", $Button1) Case $Button2 SendImageToPicControl("hover_1.png", $Button2) EndSwitch EndFunc ;==>_Hover_Proc Func _Leave_Hover_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("normal_1.png", $Button1) Case $Button2 SendImageToPicControl("normal_1.png", $Button2) EndSwitch EndFunc ;==>_Leave_Hover_Proc Func PrimaryDown_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("pressed_1.png", $Button1) Case $Button2 SendImageToPicControl("pressed_1.png", $Button2) EndSwitch EndFunc ;==>PrimaryDown_Proc Func PrimaryUp_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("enabled_1.png", $Button1) Case $Button2 SendImageToPicControl("enabled_1.png", $Button2) EndSwitch EndFunc ;==>PrimaryUp_Proc
  13. Easy shmeasy Sometimes the simplest explanation is usually the right one. This is my first ever GUI and I'm definitely learnin. Thanks UEZ
  14. Can someone pls explain why the button disappears when gui is minimized..? #include <GUIConstantsEx.au3> #include <ColorConstants.au3> #include <WindowsConstants.au3> #include <GUICtrlOnHover.au3> #include <GDIPlus.au3> #include <SendMessage.au3> _GDIPlus_Startup() Local $hGUI = GUICreate("Example", 500, 250) ;, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) $Button1 = GUICtrlCreatePic('', 0, 0, 0, 0) _GUICtrl_OnHoverRegister(-1, "_Hover_Proc", "_Leave_Hover_Proc", "PrimaryDown_Proc", "PrimaryUp_Proc") SendImageToPicControl("normal_1.png", $Button1) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Button1 EndSwitch WEnd GUIDelete($hGUI) Func SendImageToPicControl($sImage, $iCtrlID) Local Const $hImage = _GDIPlus_ImageLoadFromFile($sImage) Local Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($iCtrlID, 0x0172, $IMAGE_BITMAP, $hHBitmap)) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_ImageDispose($hImage) EndFunc ;==>SendImageToPicControl ;;;;;;;;;;;;;;;;;;;;;;;;;;PNG Button 1;;;;;;;;;;;;;;;;;;;;;;;;;; Func _Hover_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("hover_1.png", $Button1) EndSwitch EndFunc ;==>_Hover_Proc Func _Leave_Hover_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("normal_1.png", $Button1) EndSwitch EndFunc ;==>_Leave_Hover_Proc Func PrimaryDown_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("pressed_1.png", $Button1) EndSwitch EndFunc ;==>PrimaryDown_Proc Func PrimaryUp_Proc($iCtrlID) Switch $iCtrlID Case $Button1 SendImageToPicControl("enabled_1.png", $Button1) EndSwitch EndFunc ;==>PrimaryUp_Proc ;;;;;;;;;;;;;;;;;;;;;;;;;;PNG Button 1;;;;;;;;;;;;;;;;;;;;;;;;;;
×
×
  • Create New...