Jump to content

Mungo

Active Members
  • Posts

    52
  • Joined

  • Last visited

Profile Information

  • Location
    Australia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mungo's Achievements

Wayfarer

Wayfarer (2/7)

3

Reputation

  1. Just to close this topic. Problem was not related to AutoIt etc. but was caused by an apparently corrupted Windows user profile Migrated to a new user profile and all good. … Sorry. Mungo
  2. After an update installation to Win 10 V.1607 (64bit) I have noticed that help does not show formatted properly anymore e.g. with Images missing, tables, headers, sample code mal formatted etc. However, if AutoIt3Help.exe is run as Administrator everything works fine. I have already uninstalled AutoIt and SciTE for AutoIt and reinstalled both in the latest version. I have used default locations for the installation under: C:\Program Files (x86)\AutoIt3\... Any idea? Thanks
  3. Melba23, Thanks! Yes, I guess it must be a Windows 10 ‘feature’ to go more in line with the more squarish, flat and sharp edged design of Windows 10 ... however, I thought that they would have skipped the round corners altogether. Mungo
  4. I have noticed that tip text, displayed as balloon tips ($TIP_BALLOON (1)), display very different corners under Windows 10 depending on the text consisting of a single or has multiple lines (line break with @LF or @CR). Could that be a bug? I recently moved to Windows 10 and used 7 before. On an old screenshot (under Win 7) I can see that multiple-lines-tip-texts still had rounded corners (even less round than for a single line). I did not use Win 8 or 8.1 so I do not know how multi-line tip texts are rendered there. I use single and multiple lines and now have inconsistent rendering for tip texts within the same GUI - not very nice ;-). I like the ‘balloon’ style but how to make them consistently sharp or round cornered? Thanks #include <GUIConstantsEx.au3> Example() Func Example() GUICreate("GUI control tip with/without line break", 400, 200) ; Balloon tip with rounded corners GUICtrlCreateLabel("Label - tip text NO line break (Balloon tip with rounded corners)", 10, 20) GUICtrlSetTip(-1, "Tip text (NO line break)", "Title",1 ,1) ; Balloon tip with corners not rounded GUICtrlCreateLabel("Label - Tip text WITH line break (Balloon tip with corners not rounded)", 10, 100) GUICtrlSetTip(-1, "Tip text ..." & @LF & "(WITH line break)", "Title", 1, 1) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example
  5. Thanks Mobius, That gave a hint ;-) I have a compiled version ‘out there’ and recompiling, or “Just use newer one” as mLipok suggested, does the trick but my new version is not due yet ... will have to advance. Generally, I was not aware of the fact that the underlying process of determining the OS build number (through @OSBuild) had to be adjusted (in AutoIt) to give the correct number.
  6. I noticed that @OSBuild in an older compiled script returns now a wrong system build e.g. 9600 instead of 10586 under Windows 10 now. The script was compiled in April last year (2015) with v3.3.12.0. I also used @OSVersion in that script. I assume that, as the “WIN_10” descriptor was not available at that time it returns the highest OS version known at that time namely WIN_81 (instead of WIN_10) ? However, I always thought that the @OSBuild macro would read and get its value directly from the system? Thanks
  7. Yashied, Thanks for the hint and addition to my coding - fixed the problem and learned and understood something new again Great examples for both the GuiToolbar as well as Skin UDFs. I probably will use both of them in different areas of my project. I already started to work through the GuiToolbar examples before but had problems piecing things together and got stuck. However, with getting your examples I gave it another shot and it looks much more promising now. Your example is nice and complete and it is much easier for me to comprehend now how it works (thumbs UP !). I just started and I am still working on it - and some questions undoubtedly will still arise Cheers
  8. Thanks Yashied, Yes, I try to get my head around the powerful _GUICtrlToolbar_... and _GUICtrlRebar_... functions ... However, still try to understand why my example behaves the way it does ... icon not hiding despite action triggered ? Well, I try keep learning all the time. Cheers
  9. I tried to come up with a simple toolbar which displays the plain icons (without a button frame) but also shows a button effect when hovered or clicked on. My approach was to create a button, add an icon and hide the icon button again. Then place the icon without the button on top of it. When the mouse is moved over the icon I hide the icon (which leaves button displayed) giving me the hover effect for hover and clicks (using GUIGetCursorInfo() to get the icon ID). It seem to work ... but sometimes the hover effect does not show as expected especially when the mouse is moved slowly to the edge of the icon. While the icon ID is being read and action triggered (see Mouse OVER text) the icon itself is not being hidden (and button displayed). I found that the effect is more likely to occur when the GUI is freshly loaded. Can anyone reproduce this effect? I wonder what may causes this effect or is anything wrong in my coding? Any hint and support would be appreciated! Many thanks #include <StaticConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) f_toolbar() Func f_toolbar() Local $id_button_1_a, $id_button_2_a, $id_button_3_a Local $id_button_1_b, $id_button_2_b, $id_button_3_b Local $id_button_close Local $h_toolbar_gui, $msg_pop, $id_output_lbl ; -- Declare and set mouse over variables Local $last_tool_b_id = 0 ; ID of last button/icon visited Local $a_cursor_b_info ; GUIGetCursorInfo() array Local $win_w = 400 ; GUI width Local $win_h = 400 ; GUI height Local $icon_file = @SystemDir & "\shell32.dll" ; -- Create the GUI ------------------------------------------------------------------------------------------------------- $h_toolbar_gui = GUICreate("Toolbar hover - Test ...", $win_w, $win_h) ; -- A frame for the toolbar GUICtrlCreateLabel("", 3, 3, $win_w-3, 44, $SS_ETCHEDFRAME ) GUICtrlSetState(-1, $GUI_DISABLE) ; -- The Toolbar ; -- 1. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_1_a = GUICtrlCreateButton("1", 4, 4, 40, 40, $BS_ICON) ; Create BUTTON GUICtrlSetImage(-1, $icon_file, -71, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_1_b = GUICtrlCreateIcon($icon_file, -71, 4, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- 2. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_2_a = GUICtrlCreateButton("2", 44, 4, 40, 40, $BS_ICON) ; Create BUTTON GUICtrlSetImage(-1, $icon_file, -5, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_2_b = GUICtrlCreateIcon($icon_file, -5, 44, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- 3. Toolbar button ----------------------------------------------------------------------------------------------------- $id_button_3_a = GUICtrlCreateButton("3", 84, 4, 40, 40, $BS_ICON) GUICtrlSetImage(-1, $icon_file, -28, 1) ; Add ICON to button GUICtrlSetState(-1, $GUI_HIDE) ; Hide ICON BUTTON again $id_button_3_b = GUICtrlCreateIcon($icon_file, -28, 84, 4, 40, 40, $BS_CENTER) ; Create ICON to display ; -- Lable CTRL for feedback $id_output_lbl = GUICtrlCreateLabel("Move mouse over toolbar ...", 4, 100, $win_w-8, 16) ; Lable for feedback GUICtrlSetBkColor($id_output_lbl, 0xFFFFFF) ; -- The Close button $id_button_close = GUICtrlCreateButton("Close", $win_w/2-40, $win_h-40, 80, 24, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) While 1 $msg_pop = GUIGetMsg() Select Case $msg_pop = $GUI_EVENT_CLOSE ExitLoop Case $msg_pop = $id_button_close ExitLoop Case $msg_pop = $id_button_1_a Or $msg_pop = $id_button_1_b GUICtrlSetState($id_button_1_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 1 pressed ...", 0, $h_toolbar_gui) Case $msg_pop = $id_button_2_a Or $msg_pop = $id_button_2_b GUICtrlSetState($id_button_2_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 2 pressed ...", 0, $h_toolbar_gui) Case $msg_pop = $id_button_3_a Or $msg_pop = $id_button_3_b GUICtrlSetState($id_button_3_a, $GUI_SHOW) ; Show BUTTON MsgBox(32, "DEBUG", "Button 3 pressed ...", 0, $h_toolbar_gui) Case Else $a_cursor_b_info = GUIGetCursorInfo($h_toolbar_gui) ; - $aArray[4] = ID of the control that the mouse cursor is hovering over (or 0 if none) Select ; -- Button 1 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_1_b And $last_tool_b_id <> $id_button_1_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_1_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_1_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_1_b And $last_tool_b_id = $id_button_1_b ; NO MOUSE OVER GUICtrlSetState($id_button_1_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- ; -- Button 2 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_2_b And $last_tool_b_id <> $id_button_2_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_2_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_2_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_2_b And $last_tool_b_id = $id_button_2_b ; NO MOUSE OVER GUICtrlSetState($id_button_2_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- ; -- Button 3 - Cursor ------------------------------------------------------------------------------------- Case $a_cursor_b_info[4] = $id_button_3_b And $last_tool_b_id <> $id_button_3_b And $last_tool_b_id = 0 ; MOUSE OVER GUICtrlSetState($id_button_3_a, $GUI_SHOW) ; Show BUTTON GUICtrlSetData($id_output_lbl, "Mouse OVER - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0xFFFF00) $last_tool_b_id = $id_button_3_b ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- Case $a_cursor_b_info[4] <> $id_button_3_b And $last_tool_b_id = $id_button_3_b ; NO MOUSE OVER GUICtrlSetState($id_button_3_a, $GUI_HIDE) ; Hide BUTTON $a_cursor_b_info[4] = 0 GUICtrlSetData($id_output_lbl, "Mouse AWAY - Ctrl ID:" & @TAB & $a_cursor_b_info[4]) GUICtrlSetBkColor($id_output_lbl, 0x99CCFF) $last_tool_b_id = 0 ; -- DEBUG ----------------------------------------------------------------- ConsoleWrite("> ... " & "$last_tool_b_id - Ctrl ID:" & @TAB & $last_tool_b_id & @CRLF) ; -- DEBUG ----------------------------------------------------------------- EndSelect EndSelect WEnd GUIDelete() EndFunc ;==> f_toolbar()
  10. Maybe someone can help ... I use tabs on my parent (main) GUI and on a child (pop-up) GUI. I also use GUICtrlSetTip descriptions for the tab items on both GUIs. The tips are displayed correctly for the parent GUI tab items but not for the child GUI tab items. The mouse over on the child GUI tab items produces the same tip messages as for the parent GUI tab items for as many (number of) tabs and tips also found in the main GUI (the first 2). This applies regardless whether tip messages are defined for tab items in the child GUI or not. If the number of tab items with tips in the child GUI (3 tab items) is larger than in the main GUI (2 tab items), then defined tip messages are displayed correctly for those tab items (numbers) larger (in this case the 3rd tab item). Thanks A two GUI example below #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Global $main_gui, $pop_gui main_gui() Func main_gui() $main_gui = GUICreate ("Gui Main - TABs and tips", 400, 400, -1, -1, -1, -1, 0) GUICtrlCreateTab(10, 10, 200, 100) GUICtrlCreateTabItem("Main Tab 01") GUICtrlSetTip(-1, "TAB Main 1") GUICtrlCreateLabel("Mouse over tab name to see tips ...", 20, 50, 200, 20) GUICtrlCreateTabItem("Main Tab 02") GUICtrlSetTip(-1, "TAB Main 2") GUICtrlCreateLabel("Mouse over tab name to see tips ...", 20, 50, 200, 20) GUICtrlCreateTabItem("") Local $exit = GUICtrlCreateButton("Exit", 110, 360, 80, 20) Local $pop = GUICtrlCreateButton("Pop-up", 210, 360, 80, 20) GUISetState(@SW_SHOW) While 1 Local $msg_pop = GUIGetMsg() Select Case $msg_pop = $GUI_EVENT_CLOSE ExitLoop Case $msg_pop = $exit ExitLoop Case $msg_pop = $pop pop_gui() EndSelect WEnd GUIDelete() EndFunc Func pop_gui() $pop_gui = GUICreate ("Gui Pop-up - TABs and tips", 300, 300,-1, -1, -1, -1, $main_gui) GUICtrlCreateTab(10, 10, 280, 100) GUICtrlCreateTabItem("Pop-up Tab 01") GUICtrlCreateLabel("Mouse over tab name to see tips ...", 20, 50, 200, 20) GUICtrlCreateTabItem("Pop-up Tab 02") GUICtrlSetTip(-1, "TAB Pop-up 2") GUICtrlCreateLabel("Mouse over tab name to see tips ...", 20, 50, 200, 20) GUICtrlCreateTabItem("Pop-up Tab 03") GUICtrlSetTip(-1, "TAB Pop-up 3") GUICtrlCreateLabel("Mouse over tab name to see tips ...", 20, 50, 200, 20) GUICtrlCreateTabItem("") Local $exit = GUICtrlCreateButton("Exit", 110, 260, 80, 20) GUISetState(@SW_SHOW) While 1 Local $msg_pop = GUIGetMsg() Select Case $msg_pop = $GUI_EVENT_CLOSE ExitLoop Case $msg_pop = $exit ExitLoop EndSelect WEnd GUIDelete() EndFunc
  11. I wonder if there is a way to set tab stops for a label control similarly as used by the Gary Frost's UDF _GUICtrlEdit_SetTabs($hWnd, $aTabStops) for edit controls ? This would allow me to e.g. vertically aligned text along self-defined tab stops using @TAB. I get similar effects using the edit control and making it look like a label (see example) ... or any other ideas? Cheers Mungo #include <GUIConstantsEx.au3> #include <GuiEdit.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $f_size = 10 Local $tab_stops_a[4] = [5, 20, 200] ; Define stab stops Local $h_win = GUICreate ( "TEST GUI ... Set TAB stops", 500, 350) GUISetBkColor(0xffffff, $h_win) GUISetFont(10, 400, 0, "Arial", $h_win, 2) GUICtrlCreateLabel("Test: Set TAB stops ...", 10, 10) GUICtrlCreateLabel("Using LABEL ctrl with default tab stops ...", 10, 40, 380, 20) GUICtrlCreateLabel(@TAB &"-" &@TAB & "Col 1 - Some longer column text" &@TAB & "[Col 2 - Units]", 10, 60, 450, 20) GUICtrlCreateLabel(@TAB &"-" &@TAB & "Col 1 - Short text" &@TAB & "[Col 2 - Units]", 10, 80, 450, 20) GUICtrlCreateLabel("Using EDIT ctrl and setting tab stops where I want them to be ...", 10, 120, 380, 20) GUICtrlCreateEdit(@TAB &"-" &@TAB & "Col 1 - Some longer column text" &@TAB & "[Col 2 - Units]", 10, 140, 450, 20, BitOR($ES_AUTOHSCROLL, $ES_READONLY), 0) GUICtrlSetBkColor(-1, 0xffffff) _GUICtrlEdit_SetTabStops(-1, $tab_stops_a) GUICtrlCreateEdit(@TAB &"-" &@TAB & "Col 1 - Short text" &@TAB & "[Col 2 - Units]", 10, 160, 450, 20, BitOR($ES_AUTOHSCROLL, $ES_READONLY), 0) GUICtrlSetBkColor(-1, 0xffffff) _GUICtrlEdit_SetTabStops(-1, $tab_stops_a) Local $button = GUICtrlCreateButton("Close", 210, 310, 80, 20) GUISetState(@SW_SHOW) While 1 Local $msg_pop = GUIGetMsg() Select Case $msg_pop = $GUI_EVENT_CLOSE ExitLoop Case $msg_pop = $button ExitLoop EndSelect WEnd GUIDelete() EndFunc
  12. Tjalve et al., I used the old _StringEncrypt() function quite excessively and I am quite willing to convert to the much better and more flexible new one based on <Crypt.au3>. However I have also the problem of having old compiled programs on remote machines (not accessible to me) using the old encryption to access encrypted data locally as well as accessing encrypted data over the Internet. Introducing an update with the new encryption will break the system. I probably have to write a module which converts (replaces) old to (with) new if a user performs an update. In order to be able to still use the old function (to decrypt old data) I have extracted the _StringEncrypt() function section out of the old <String.au3> file and included in my code so that I can still use it. I can then use the new to write the data back using the new encryption. Cheers Mungo
  13. Thanks Melba23, Yes, great answer, cleared my confusion :-) ... solved the problem. I presumed but wasn't 100% sure whether all the 'official' UDFs installed with AutoIt would all be crosschecked. As to other UDFs. I realise that I should store them separately - making it easier to maintain. Thanks for the "Adding UDFs to AutoIt and SciTE" hint. Cheers Mungo
  14. Thanks guinness and Waubot, Seems that other UDFs may also be affected such as <icons.au3>. I frequently use the _SetImage() function from <icons.au3> which also expects a global variable $ghGDIPDll ... I try to avoid a search and replace in original UDFs as the next update would overwrite it again. Is there any other smart option to approach this issue? Thanks Mungo
  15. Thanks Melba23, Yes, the help is actually very detailed and good. However, what confused me was the (for me) unexpected kinks when increasing the "weight" factor. I tried various "weight" settings in a 100 increment from 0 to 1000 also with different fonts and sizes. Different fonts behave slightly differently especially in relation to the increase / decrease of boldness when weight factor is increased. E. g. Arial, Segoe UI, Tahoma and Times New Roman actually show two kinks (steps) first increasing the "boldness" drastically (with 600) but then decreasing again to a lesser extent (>=700). The results are that boldness from 0 to 500 is "normal", 600 is "very bold" and 700 to 1000 is "bold" lower again (Example left). It actually looks like a MS bug to me ... Other fonts such as MS Sans Serif and MS Serif only show one kink when increasing the boldness factor (Example righ) I wonder whether these results could also be related to the font version or OS used ? I use Win 7. Any other experiences with XP and Win 8 and 8.1 ? Cheers Mungo
×
×
  • Create New...