Jump to content

rdwray

Active Members
  • Posts

    169
  • Joined

  • Last visited

rdwray's Achievements

Prodigy

Prodigy (4/7)

1

Reputation

  1. This code seems to work, but the window is totally disabled, even the min/max/close buttons are gray; why? Here is my code - this is a work in progress: #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;#NoTrayIcon Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown. TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "SpecialEvent") TraySetOnEvent($TRAY_EVENT_SECONDARYUP, "SpecialEvent") $window = GUICreate("No Tray Menu") GuiCreate("Dummy") $hWnd = WinGetHandle("Dummy") DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $hWnd) GUISetState(@SW_SHOW, $hWnd) GUISetState(@SW_ENABLE, $hWnd) TraySetState(1) While 1 Sleep(10) ; Idle loop If GUIGetMsg() = $Gui_Event_Close Then Exit WEnd Exit ; Functions Func SpecialEvent() Select Case @TRAY_ID = $TRAY_EVENT_PRIMARYDOUBLE MsgBox(64, "SpecialEvent-Info", "Primary mouse button double clicked.") Case @TRAY_ID = $TRAY_EVENT_SECONDARYUP GUISetState(@SW_SHOWNORMAL, $hWnd) TraySetState(2) ;MsgBox(64, "SpecialEvent-Info", "Secondary mouse button clicked.") EndSelect EndFunc ;==>SpecialEvent Func ExitEvent() Exit EndFunc ;==>ExitEvent
  2. Yea, I am working on that and another issue is showing up in getting rid of the taskbar icon. Using a toolbar window removes minimize button and WinGetHandle(AutoItWinGetTitle()) minimizes to the desktop; but I haven't given up yet....
  3. Can a window be restored from the tray by clicking on the icon rather than having a menu?
  4. Interprocess - sounds like it may be a wall. I am looking at some scripts that use the non-client area and I may get a headache before this one is over - to dump to stop.
  5. M23, cannot this C++ file (attached) be implemented in au3? RBTray.zip
  6. Ok, I took some pain killer and used the zip file which contained an updated SciTE udf file and api which will not affect the the visual. I backed up SciTE and then copied the files and everything is A-OK and working; and I didn't get any errors on run from any "include" files. Thanks for all the help from both of you.... Off the subject: M23, I found a C++ file that will minimize a window to tray and I will post the zip in our previous discussion. I don't see why it can't be implemented in au3.
  7. The issue arises if AutoIt needs to over write a SciTe file, I cannot copy it back anyway. I will do the backup before any install. I also downloaded the zip version and will take a look at that first. I love having fun!!!!!!!
  8. I just download autoit-v3-setup.exe and none of SciTE as I all ready had the SciTE4AutoIt3 installed. I don't know what is insided of the setup file which makes me nervous.
  9. Question before I install the FULL version of 3.3.8: Is this going to affect SciTE visual properties? I put a lot of work into configuring it a long time ago and I don't want to re-educate myself on that painful situation...
  10. v3.3.6.1 - Gone looking for updates....
  11. M23, here is the script: #Include <Misc.au3> #include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <SendMessage.au3> While 1 GUIGetMsg() $hWnd = WinGetHandle("[ACTIVE]") $title = WinGetTitle($hWnd) $coord = WinGetPos($hWnd) If NOT _IsPressed("01", "user32.dll") Then Local $fp = 0, $b = 0, $c = 0 ToolTip("") Else If $title <> "Program Manager" AND $title <> "" Then $BarInfo = _GetTitleBarInfo($hWnd) $bH = DllStructGetData($BarInfo, "Bottom") - DllStructGetData($BarInfo, "Top") $x1 = $coord[0] $y1 = $coord[1] $xW = $coord[2] $yH = $coord[3] $x2 = $x1+$xW $y2 = $y1+$yH $yT = $y1+$bH $mc = MouseGetCursor() $Cx = MouseGetPos(0) $Cy = MouseGetPos(1) If $fp = 0 Then $fp = 1 If $fp = 1 Then ;First pass $fp += 1 If $mc = $IDC_ARROW Then If $Cx >= $x1 AND $Cx <= $x2 AND $Cy >= $y1 AND $Cy <= $yT Then _SendMessage($hWnd, $WM_NCLBUTTONDOWN, $WM_NCHITTEST, $HTMINBUTTON) If @error Then ;Title bar minimize button was not selected $b = $Cx-$x1 $c = $Cy-$y1 EndIf EndIf EndIf EndIf If $b <> 0 Then $x1 = $Cx-$b $y1 = $Cy-$c $XY = " X:" & $x1 & " Y:" & $y1 ToolTip($XY, $x1, $y1, "", 0, 4) EndIf EndIf EndIf WEnd Func _GetTitleBarInfo($hwnd) $Tag_struct = "DWORD cbSize;" & $tagRECT & ";DWORD rgstate[6]" $BarInfo = DllStructCreate($Tag_struct) DllStructSetData($BarInfo, "cbSize", DllStructGetSize($BarInfo)) DllCall("User32.dll", "int", "GetTitleBarInfo", "HWND",$hwnd, "ptr",DllStructGetPtr($BarInfo)) Return $BarInfo EndFunc
  12. Full list: #Include <Misc.au3> #include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <SendMessage.au3>
  13. APIConstants.au3, Version: 3.6 / 3.3.8.0, is giving me the following errors. I tried an earlier version 3.5 and had the same effect. I also tried some editing of the file but it just kept cascading into other errors. How to fix??? C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(1145,64) : WARNING: $STANDARD_RIGHTS_REQUIRED: possibly used before declaration. Global Const $FILE_ALL_ACCESS = BitOR($STANDARD_RIGHTS_REQUIRED, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(1145,78) : WARNING: $SYNCHRONIZE: possibly used before declaration. Global Const $FILE_ALL_ACCESS = BitOR($STANDARD_RIGHTS_REQUIRED, $SYNCHRONIZE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(2749,36) : WARNING: $IDI_HAND: possibly used before declaration. Global Const $IDI_ERROR = $IDI_HAND ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(2750,46) : WARNING: $IDI_ASTERISK: possibly used before declaration. Global Const $IDI_INFORMATION = $IDI_ASTERISK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(2751,45) : WARNING: $IDI_EXCLAMATION: possibly used before declaration. Global Const $IDI_WARNING = $IDI_EXCLAMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(3116,53) : WARNING: $STANDARD_RIGHTS_READ: possibly used before declaration. Global Const $KEY_READ = BitOR($STANDARD_RIGHTS_READ, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(3117,55) : WARNING: $STANDARD_RIGHTS_WRITE: possibly used before declaration. Global Const $KEY_WRITE = BitOR($STANDARD_RIGHTS_WRITE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files (x86)\AutoIt3\Include\APIConstants.au3(1145,64) : ERROR: $STANDARD_RIGHTS_REQUIRED: undeclared global variable. Global Const $FILE_ALL_ACCESS = BitOR($STANDARD_RIGHTS_REQUIRED, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Backup\AutoIt\Test Area\NonClientArea.au3 - 1 error(s), 7 warning(s)
  14. M23, the reason I was trying to use an image instead of a button is because of the outline the button creates. In the case of the image list the image is moved to the right approx 5 pixels and filling the rest of the button - in other words, I need to move the image 5 pixels to the left using a button.
  15. M23, thanks, I will definitely do some studing on this one. Once in awhile you smart people let go with some of your knowledge....
×
×
  • Create New...