Jump to content

Skysnake

Active Members
  • Posts

    1,099
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Thanks
    Skysnake reacted to water in OutlookEX UDF - Help & Support (IV)   
    This is the stripped down function code as I think it should look like:
    ; #FUNCTION# ==================================================================================================================== ; Name...........: _OL_Wrapper_CreateAppointment ; Description ...: Creates an appointment (wrapper function). ; Syntax.........: _OL_Wrapper_CreateAppointment($oOL, $sSubject, $sStartDate[, $vEndDate = 30[, $sLocation = ""[, $bAllDayEvent = False[, $sBody = ""[, $iReminder = 15[, $iShowTimeAs = $olBusy[, $iImportance = $olImportanceNormal[, $iSensitivity = ""]]]]]]]) ; Parameters ....: $oOL - Outlook object returned by a preceding call to _OL_Open() ; $sSubject - The Subject of the Appointment. ; $sStartDate - Start date & time of the Appointment, format YYYY-MM-DD HH:MM - or what is set locally. ; $vEndDate - [optional] End date & time of the Appointment, format YYYY-MM-DD HH:MM - or what is set locally OR ; Number of minutes (default = 30 minutes). ; $sLocation - [optional] The location where the meeting is going to take place (default = ""). ; $bAllDayEvent - [optional] True or False(default). If set to True and the appointment is lasting for more than one day, ; $vEndDate must be one day higher than the actual end Date. ; $sBody - [optional] The Body of the Appointment (default = ""). ; $iReminder - [optional] Reminder in Minutes before $sStartDate, 0 for no reminder (default = 15). ; $iShowTimeAs - [optional] One of this constants: $olBusy (default), $olFree, $olOutOfOffice or $olTentative. ; $iImportance - [optional] One of this constants: $olImportanceNormal (default), $olImportanceHigh or $olImportanceLow. ; $iSensitivity - [optional] One of this constants: $olNormal (default), $olPersonal, $olPrivate or $olConfidential. ; Return values .: Success - Object of the appointment ; Failure - Returns 0 and sets @error: ; |1 - $sStartDate is invalid ; |2 - $sBody is missing ; |4 - $sTo, $sCc and $sBCc are missing ; |1xxx - 1000 + error returned by function _OL_FolderAccess ; |2xxx - 2000 + error returned by function _OL_ItemCreate ; |3xxx - 3000 + error returned by function _OL_ItemModify ; Author ........: water ; Modified.......: ; Remarks .......: This is a wrapper function to simplify creating an appointment. If you have to set more properties etc. you have to do all steps yourself ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _OL_Wrapper_CreateAppointment($oOL, $sSubject, $sStartDate, $vEndDate = 30, $sLocation = "", $bAllDayEvent = False, $sBody = "", $iReminder = 15, $iShowTimeAs = $olBusy, $iImportance = $olImportanceNormal, $iSensitivity = $olNormal) If $vEndDate = Default Then $vEndDate = 30 If $sLocation = Default Then $sLocation = "" If $bAllDayEvent = Default Then $bAllDayEvent = False If $sBody = Default Then $sBody = "" If $iReminder = Default Then $iReminder = 15 If $iShowTimeAs = Default Then $iShowTimeAs = $olBusy If $iImportance = Default Then $iImportance = $olImportanceNormal If $iSensitivity = Default Then $iSensitivity = $olNormal If Not _DateIsValid($sStartDate) Then Return SetError(1, 0, 0) Local $sEnd, $oItem ; Access the default calendar Local $aFolder = _OL_FolderAccess($oOL, "", $olFolderCalendar) If @error Then Return SetError(@error + 1000, @extended, 0) ; Create an appointment item in the default calendar and set properties If _DateIsValid($vEndDate) Then $sEnd = "End=" & $vEndDate Else $sEnd = "Duration=" & Number($vEndDate) EndIf $oItem = _OL_ItemCreate($oOL, $olAppointmentItem, $aFolder[1], "", "Subject=" & $sSubject, "Location=" & $sLocation, "AllDayEvent=" & $bAllDayEvent, _ "Start=" & $sStartDate, "Body=" & $sBody, "Importance=" & $iImportance, "BusyStatus=" & $iShowTimeAs, $sEnd, "Sensitivity=" & $iSensitivity) If @error Then Return SetError(@error + 2000, @extended, 0) ; Set reminder properties If $iReminder <> 0 Then $oItem = _OL_ItemModify($oOL, $oItem, Default, "ReminderSet=True", "ReminderMinutesBeforeStart=" & $iReminder) If @error Then Return SetError(@error + 3000, @extended, 0) Else $oItem = _OL_ItemModify($oOL, $oItem, Default, "ReminderSet=False") If @error Then Return SetError(@error + 3000, @extended, 0) EndIf Return $oItem EndFunc ;==>_OL_Wrapper_CreateAppointment  
  2. Like
    Skysnake reacted to water in OutlookEX UDF - Help & Support (IV)   
    I had a quick look at the code and noticed that the wrapper functions need a brush up in this area.
    I will post updated code as soon as possible.
    Unfortunately I no longer have access to Outlook and jhence can't test my code.
    Would you mind to do the testing for me when the new code is ready?
     
  3. Thanks
    Skysnake reacted to Deathdn in Input placeholder instead of raw text   
    _GUICtrlEdit_SetCueBanner(-1, "placeholder", True) ; placeholder How about it?
  4. Like
    Skysnake reacted to RonniHH in Outlook - Change calendar month view to 3 weeks   
    Hi
    So I have a bit of a challenge. I use a multimonitor setup, and I'm trying to accomplish the following:
    After login launch Outlook in two windows Pin one of the windows to my top screen and customize the view: Change to calendar Change to month view Hide ribbon Hide navigator pane Maximize windows Change to the other Outlook window and customize the view: Show ribbon Show navigator pane Return ribbon to default position Maximize window Minimize Window Everything works as intended! I'm quite proud actually - as this is my first AutoIT-script ever.
    But - I still need one thing: I would really like my month view to only include this week and the next 2 (total 3 weeks). This seems to be impossible using either VBA or keyboard shortcuts. The only way to do accomplish this is by using a mouse to mark / drag the number of weeks in the mini-calendar in the navigator pane.
    And this mini-calendar is dynamic, which means todays date changes is place every day.
    I really need a good idea - or maybe even a solution? I've included my script as it looks right now.
    Thanks in advance.
    Ronni
    StartOutlookAtLogon.au3
  5. Like
    Skysnake reacted to Melba23 in How to increase the number of items displayed in a dropdown box   
    Darien,
    I get a scroll bar displayed as soon as I go over 30 items:
    #include <GUIConstantsEx.au3> GUICreate("Test", 300, 100) $Combo = GUICtrlCreateCombo("", 10, 30, 280, 25) For $i = 1 To 31 GUICtrlSetData($Combo, "Combo Item Number: " & $i) Next GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Combo ConsoleWrite(GUICtrlRead($Combo) & @CRLF) EndSwitch WEnd And you change the number of displayed items like this:
    #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ComboConstants.au3> ; Create 25 data items $sData = "|" For $i = 1 To 45 $sData &= $i & "|" Next $hGUI = GUICreate("Test", 500, 500) ; Create the combo with a read-only edit field and a scrollbar $hCombo = GUICtrlCreateCombo("", 10, 10, 100, 20, BitOr($CBS_DROPDOWNLIST, $WS_VSCROLL)) ; Set number of visible items GUICtrlSendMsg($hCombo, $CB_SETMINVISIBLE, 40, 0) GUICtrlSetData($hCombo, $sData) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Hope that helps,
    M23
  6. Like
    Skysnake reacted to KaFu in Why does ChrW(AscW("🔊")) not produce 🔊?   
    Another example for fun 😉.
    #include <GUIConstantsEx.au3> GUICreate("Pictograms Listview", 420, 800) Local $idListview = GUICtrlCreateListView("Pictograms-1|Pictograms-2|Pictograms-3|Pictograms-4", 10, 10, 400, 780) GUICtrlSetFont(-1, 40) ; https://www.gaijin.at/de/infos/unicode-zeichentabelle-piktogramme-1 For $i = 0x1F300 To 0x1F3FF GUICtrlCreateListViewItem(_ChrW($i) & "|" & _ChrW($i + 256) & "|" & _ChrW($i + 256 + 256) & "|" & _ChrW($i + 256 + 256 + 256), $idListview) Next GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func _ChrW($iCodePoint) ; By trancexx ; https://www.autoitscript.com/forum/topic/149307-another-unicode-question/?do=findComment&comment=1064547 If $iCodePoint <= 0xFFFF Then Return ChrW($iCodePoint) If $iCodePoint > 0x10FFFF Then Return SetError(1, 0, "") Local $tOut = DllStructCreate("word[2]") Local $high_surrogate = BitShift($iCodePoint, 10) + 0xD7C0 Local $low_surrogate = BitAND($iCodePoint, 0x3FF) + 0xDC00 ConsoleWrite("CodePoint = " & @TAB & @TAB & Hex($iCodePoint, 4) & @CRLF) ConsoleWrite("High Surrogate = " & @TAB & Hex($high_surrogate, 4) & @CRLF) ConsoleWrite("Low Surrogate = " & @TAB & Hex($low_surrogate, 4) & @CRLF) ConsoleWrite(@CRLF) DllStructSetData($tOut, 1, $high_surrogate, 1) DllStructSetData($tOut, 1, $low_surrogate, 2) Return BinaryToString(DllStructGetData(DllStructCreate("byte[4]", DllStructGetPtr($tOut)), 1), 2) EndFunc ;==>_ChrW  
  7. Like
    Skysnake reacted to KaFu in Why does ChrW(AscW("🔊")) not produce 🔊?   
    Found a function example by trancexx on how to calculate the high and low surrogate.
    #include <GUIConstantsEx.au3> Local $hGUI = GUICreate("Test", 200, 90) Local $hLabel = GUICtrlCreateLabel("", 5, 5, 190, 130) GUICtrlSetFont($hLabel, 48) ; https://www.gaijin.at/de/infos/unicode-zeichentabelle-piktogramme-3 GUICtrlSetData($hLabel, " " & _ChrW(0x1F50A) & " " & _ChrW(0x1F525)) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func _ChrW($iCodePoint) ; By trancexx ; https://www.autoitscript.com/forum/topic/149307-another-unicode-question/?do=findComment&comment=1064547 If $iCodePoint <= 0xFFFF Then Return ChrW($iCodePoint) If $iCodePoint > 0x10FFFF Then Return SetError(1, 0, "") Local $tOut = DllStructCreate("word[2]") Local $high_surrogate = BitShift($iCodePoint, 10) + 0xD7C0 Local $low_surrogate = BitAND($iCodePoint, 0x3FF) + 0xDC00 ConsoleWrite("CodePoint = " & @tab& @tab & Hex($iCodePoint,4) & @crlf) ConsoleWrite("High Surrogate = " & @tab & Hex($high_surrogate, 4) & @CRLF) ConsoleWrite("Low Surrogate = " & @tab & Hex($low_surrogate, 4) & @CRLF) ConsoleWrite(@CRLF) DllStructSetData($tOut, 1, $high_surrogate, 1) DllStructSetData($tOut, 1, $low_surrogate, 2) Return BinaryToString(DllStructGetData(DllStructCreate("byte[4]", DllStructGetPtr($tOut)), 1), 2) EndFunc ;==>_ChrW  
  8. Like
    Skysnake reacted to jchd in Why does ChrW(AscW("🔊")) not produce 🔊?   
    Example of a single glyph (once rendered) using pre-computed surrogates:
    ; A familly with different Fitzpatrick settings = only one glyph $s = ChrW(0xD83D) & ChrW(0xDC68) & ChrW(0xD83C) & ChrW(0xDFFB) & ChrW(0x200D) & ChrW(0xD83D) & ChrW(0xDC69) & ChrW(0xD83C) & ChrW(0xDFFF) & ChrW(0x200D) & ChrW(0xD83D) & ChrW(0xDC66) & ChrW(0xD83C) & ChrW(0xDFFD) MsgBox(0, "", $s) If displayed on a Unicode-aware console (I'm using font DejaVu), this is
    👨🏻‍👩🏿‍👦🏽
    else in the MsgBox the default font is much less pretty.
    EDIT: I just notice that the html-ed string is showing as 3 separate glyphs (ZWJ gets ignored), contrary to what I get displayed here.

  9. Like
    Skysnake reacted to TheXman in jq UDF - A Powerful & Flexible JSON Processor   
    What's New in Version v1.7.0
    Released 4 minutes ago
    Internal code optimizations Increased query speed jqExec() and _jqExecFile() now accept string filters with comments (#), as if they were passed in from a file using the -f or --from-file option.  

    jq UDF has a new companion tool for creating, testing, and learning JSON parsing and processing, it's called jqPlayground,  It can be found in the AutoIt Downloads area under "Information Gathering" or by clicking HERE.  It comes with over 15 JSON processing examples.  You can modify and play with the examples or create & test your own.

  10. Sad
    Skysnake reacted to LarsJ in Microsoft Edge - WebView2, embed web code in your native application   
    What I'm trying to say is simply that the entire WebView project is based on techniques and code that are so complicated that AutoIt programmers will not find it attractive and therefore will not use it. We run the risk that a UDF as a result of the project will simply not be used. 
  11. Like
    Skysnake reacted to ptrex in Microsoft Edge - WebView2, embed web code in your native application   
    Hi guys,
    All works fine 🙂
    The reason is just a matter of telling the application where to look for the DLL.
    Solution :
    I found the it here : 
    https://www.codeproject.com/Tips/5287858/WebView2-Edge-Browser-in-MFC-Cplusplus-Application
     
    What to do, if Build is successful and when you run, it fails.
    Open the project in the file system, there is one debug folder (which is created once the build is successful). In the debug folder, there are three different folders - arm64, x64, x86 and each one contains the file "WebView2Loader.dll".
    So based on your environment, copy the "WebView2Loader.dll" file and paste where your .exe is located.
    Root cause :
    When you run the script in SciTE, it does not find the DLL because it is ran from the AutoIT folder...
    When you compile the script and put is in the .EXE same folder as the DLL all runs fine ...
    Check :
    Once you have ran it, it will create a new folder and a bunch of sub folders and files :
    Main Folder is called : WebView2.exe.WebView2
     
    Great job LarsJ  👌
  12. Thanks
    Skysnake reacted to LarsJ in Microsoft Edge - WebView2, embed web code in your native application   
    Getting started example step 3: WebView window
    First AutoIt implementation. Tested on Windows 10/7, 32/64 bit. Execute WebView2.au3:
    #AutoIt3Wrapper_Au3Check_Parameters=-d -w- 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=y Opt( "MustDeclareVars", 1 ) #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPICom.au3> #include <WinAPI.au3> Global $hGui, $oCoreWebView2Environment, $oCoreWebView2Controller #include "..\Includes\WV2Interfaces.au3" WebView2() Func WebView2() $hGui = GUICreate( "WebView2 Sample", 1200, 900, -1, -1, $WS_OVERLAPPEDWINDOW ) _WinAPI_CoInitialize( $COINIT_APARTMENTTHREADED ) CoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerCreate() ConsoleWrite( "$pCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = " & $pCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler & @CRLF & @CRLF ) CoreWebView2CreateCoreWebView2ControllerCompletedHandlerCreate() ConsoleWrite( "$pCoreWebView2CreateCoreWebView2ControllerCompletedHandler = " & $pCoreWebView2CreateCoreWebView2ControllerCompletedHandler & @CRLF & @CRLF ) Local $hWebView2Loader = DllOpen( @AutoItX64 ? "WebView2Loader-x64.dll" : "WebView2Loader-x86.dll" ) Local $aRet = DllCall( $hWebView2Loader, "long", "CreateCoreWebView2EnvironmentWithOptions", "wstr", "", "wstr", "", _ "ptr", NULL, "ptr", $pCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler ) If @error Or $aRet[0] Then Return ConsoleWrite( "CreateCoreWebView2EnvironmentWithOptions ERR" & @CRLF ) ConsoleWrite( "CreateCoreWebView2EnvironmentWithOptions OK" & @CRLF & @CRLF ) GUISetState( @SW_SHOW ) While 1 Switch GUIGetMsg() Case $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESIZED Local $tRect = _WinAPI_GetClientRect( $hGui ) $oCoreWebView2Controller.put_Bounds( $tRect ) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd CoreWebView2CreateCoreWebView2ControllerCompletedHandlerDelete() CoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerDelete() DllClose( $hWebView2Loader ) EndFunc Func CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke( $pSelf, $long, $ptr ) ; Ret: long Par: long;ptr* ConsoleWrite( "CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke" & @CRLF ) $oCoreWebView2Environment = ObjCreateInterface( $ptr, $sIID_ICoreWebView2Environment, $dtag_ICoreWebView2Environment ) ConsoleWrite( "IsObj( $oCoreWebView2Environment ) = " & IsObj( $oCoreWebView2Environment ) & @CRLF & @CRLF ) $oCoreWebView2Environment.CreateCoreWebView2Controller( $hGui, $pCoreWebView2CreateCoreWebView2ControllerCompletedHandler ) Return 0 #forceref $pSelf, $long EndFunc Func CoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke( $pSelf, $long, $ptr ) ; Ret: long Par: long;ptr* ConsoleWrite( "CoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke" & @CRLF ) $oCoreWebView2Controller = ObjCreateInterface( $ptr, $sIID_ICoreWebView2Controller, $dtag_ICoreWebView2Controller ) ConsoleWrite( "IsObj( $oCoreWebView2Controller ) = " & IsObj( $oCoreWebView2Controller ) & @CRLF ) $oCoreWebView2Controller.AddRef() $oCoreWebView2Controller.get_CoreWebView2( $pCoreWebView2 ) $oCoreWebView2 = ObjCreateInterface( $pCoreWebView2, $sIID_ICoreWebView2, $dtag_ICoreWebView2 ) ConsoleWrite( "IsObj( $oCoreWebView2 ) = " & IsObj( $oCoreWebView2 ) & @CRLF & @CRLF ) Local $tRect = _WinAPI_GetClientRect( $hGui ) $oCoreWebView2Controller.put_Bounds( $tRect ) $oCoreWebView2.Navigate( "https://www.bing.com/" ) Return 0 #forceref $pSelf, $long EndFunc The code is translated to AutoIt from the C++ code in the Getting started example step 3 and from the AutoHotkey code in WebView2.ahk.
    A slightly updated example is included in WebView2-1.au3 in the 7z-file at bottom of this post.
  13. Like
    Skysnake reacted to jchd in _SQLite_Close problem   
    It may not be the behavior you expect, but it conforms to the specification (last used handle)... and legacy code.
  14. Thanks
    Skysnake got a reaction from mLipok in ADO.au3 UDF - BETA - Support Topic   
    -- 2023.03.20 Postgres INSERT UNNEST Example CREATE TABLE IF NOT EXISTS demounnest (dname text, dbday text); TRUNCATE TABLE demounnest; INSERT INTO demounnest (dname, dbday) VALUES ('Abe' -- dname , '1969-07-04') ,('Ben' -- dname , '1979-08-05') ; INSERT INTO demounnest (dname, dbday) SELECT UNNEST(ARRAY['Devon','Earl']) ,UNNEST(ARRAY['1989-01-31','1999-02-28']) ; SELECT * FROM demounnest; -- RESULT "Abe" |"1969-07-04" "Ben" |"1979-08-05" "Devon"|"1989-01-31" "Earl" |"1999-02-28" PostgreSQL: Documentation: 15: 9.19. Array Functions and Operators
    unnest ( anyarray ) → setof anyelement Expands an array into a set of rows. The array's elements are read out in storage order. unnest(ARRAY[1,2]) → 1 2 unnest(ARRAY[['foo','bar'],['baz','quux']]) → foo bar baz quux The real power of UNNEST is the speed. When we select data from tables we tend to select rows, and insert rows. This is the standard approach. But it is slow.
    UNNEST, even in this mini  example, is 0.25s faster than the conventional insert. 
    UNNEST has been available since before version 9.0 and in 9.15 (Current) UNNEST for SELECT has been expanded. 
  15. Like
    Skysnake reacted to water in Ignore Control in TabOrder   
    You guys are absolutely amazing
    Thank you both for this solution, it works like a charm!
    Unfortunately I can only mark a single post as solution So I marked Melba's post as the solution and pixelsearch's post got a like
  16. Like
    Skysnake reacted to Nine in Hint for the GuictrlCreateInput()   
    Maybe _GUICtrlEdit_GetCueBanner ?
  17. Like
    Skysnake reacted to rsn in Application Is blocked   
    In my environment, I had to talk to the Sec team to get my apps excluded from the AV product scans. Also, I've found that compiling as x64 with no UPX throws the least amount of false positives from them and VirusTotal. 
  18. Like
    Skysnake got a reaction from argumentum in GUI FontIcon   
    ; #include <FontConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Local $hGUI = GUICreate("Example", 200, 200) ; 2023.03.12 FontIcon! Local $sFont, $s ; define reusable vars $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0xE160) ; hand $idFilemenu = GUICtrlCreateMenu($s & " &File Index ") $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0xE203) ; OK Local $idFileItem = GUICtrlCreateMenuItem($s & " File Option", $idFilemenu) GUICtrlCreateMenuItem("", $idFilemenu) ; create a separator line $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- set font, Font Size does not affect Menus $s = ChrW(0x26DD) ; box with cross Local $idExit = GUICtrlCreateMenuItem($s & " Exit ", $idFilemenu) $sFont = "Segoe MDL2 Assets" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0xE2F6) Local $iconPrint = GUICtrlCreateButton($s, 8, 28, 48, 48) ; <-- button containing fonticon $sFont = "Segoe UI Emoji" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0x2668) Local $iconMedal = GUICtrlCreateButton($s, 60, 28, 48, 48) ; <-- button containing fonticon $sFont = "Segoe UI Symbol" ; <-- a default Windows font GUISetFont(24, $FW_NORMAL, $GUI_FONTNORMAL, $sFont) ; <-- make font size half of button dimensions $s = ChrW(0xE129) Local $iconPennon = GUICtrlCreateButton($s, 112, 28, 48, 48) ; <-- button containing fonticon ; take care to reset to an easy read font $sFont = "Segoe" GUISetFont(12, 400, 0, $sFont) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idExit ExitLoop Case $iconPrint MsgBox(0, "FontIcon", "You have clicked a FontIcon!") Case $iconMedal MsgBox(0, "FontIcon Emoji", "Hotstuff!") Case $iconPennon MsgBox(0, "FontIcon Symbol", "Keep the Flag flying") Case $idFileItem MsgBox(0, "Menu Item!", "Do Something!") EndSwitch WEnd GUIDelete($hGUI) A picture paints a thousand words, and having access to icons often contributes to the aesthetics of a GUI.
    It's not always easy or convenient to make icon files, or compile these into a DLL for later use.
     
    Fortunately the onboard Windows Segoe font family provides access to a whole set of font icons. A font icon is a font character that does not paint a letter, but a picture, like an emoji.
    Using a FontIcon also allows placing images directly into menu items, which would otherwise require a lot of work
  19. Like
    Skysnake reacted to Jos in When compiling with a3x, the icon is not applied - (Moved)   
    Your welcome.
    PS: I have finally fixed a long standing issue where VALUE "VarFileInfo", "$"  was always being created in the StringFileInfo block.
    Updated AutoIt3Wrapper.au3 available in Beta.
  20. Like
    Skysnake reacted to Jos in When compiling with a3x, the icon is not applied - (Moved)   
    This will only work when:
    You have the full SciTE4AutoIt3 installer installed with AutoIt3Wrapper You compile to an EXE !   not A3X as that is missing the PE header a program has which contains the ICO info.
  21. Like
    Skysnake got a reaction from SOLVE-SMART in How to exclude ESC from $GUI_EVENT_CLOSE?   
    Break(0) ; user can not break - Windows Exit required 😉
     
  22. Like
    Skysnake reacted to mLipok in _MSSQL.au3 help   
    You should really start using ADO.au3 udf.
  23. Like
    Skysnake reacted to argumentum in Au3toCmd -- Avoid false virus positives. (Version: 2022.09.01)   
    If Not @Compiled Then ; this is simpler and will work fine with portable setups $sA3Dir = StringLeft(@AutoItExe, StringInStr(@AutoItExe, '\', 0, -1)-1) If $beta Then $sA3Dir &= "\Beta" $sA3Ver = StringReplace(FileGetVersion($sA3Dir & "\autoit3.exe"), ",", ".") Else $sA3Dir = RegRead("HKLM\SOFTWARE" & ((@OSArch = 'X64') ? "\Wow6432Node" : "") & "\AutoIt v3\AutoIt", ($beta ? "beta" : "") & "InstallDir") $sA3Ver = RegRead("HKLM\SOFTWARE" & ((@OSArch = 'X64') ? "\Wow6432Node" : "") & "\AutoIt v3\AutoIt", ($beta ? "beta" : "") & "Version") EndIf .. I think that the above is better. Food for thought.
    Edit: Fixed the "$beta" part I did not considered when posting.
  24. Like
    Skysnake reacted to jchd in Characters that don't break IniWrite()?   
    To display Unicode correctly in the Scite console, change the Scite console setting to Unicode (charset 65001) and check that the font you use contains enough of Unicode for your needs. DejaVu Sans Mono is perfect for that. Then use the double conversion as cited above.
    First conversion is from a UCS2 (subset of Unicode used by AutoIt) to binary UTF8, second conversion is from binary UTF8 to UTF8 characters.
  25. Like
    Skysnake got a reaction from pixelsearch in ListView export speed   
    _GUICtrlListView_BeginUpdate($ListView) Do not underestimate the value of wrapping ListView populate / delete functions in               _GUICtrlListView_BeginUpdate and
    _GUICtrlListView_EndUpdate
     
    I had a Listview with 6000+ lines of data, took ~ 60 seconds / 1000 lines of data (very slow). Wrapping both the data add, and the _GUICtrlListView_DeleteAllItems in _GUICtrlListView_BeginUpdate reduced the total time to delete and re-populate to ~90 seconds (acceptable)
×
×
  • Create New...