Jump to content

When compiling with a3x, the icon is not applied - (Moved)


Recommended Posts

(If translated with a translator, it may be written a little awkwardly. I would be grateful if you could understand my situation)

As mentioned in the title, the icon file, which was applied well when compiled with exe, does not apply when compiled with a3x, and is displayed as the default autoit icon.

 

#AutoIt3Wrapper_Icon=icon.ico

 

I specified the icon file at the top, but why can't it be applied? Is there any way to compile with a3x including icons?

Link to post
Share on other sites
  • Moderators

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

this way it works with or without compilation
No need to set #AutoIt3Wrapper_Icon. The icon of <file>.a3x I don't think it changes

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <WinAPIShellEx.au3>
#include <TrayConstants.au3> ; Required for the $TRAY_ICONSTATE_SHOW constant.

Opt("TrayMenuMode", 3) ; 1+2 ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return

_WinAPI_SetCurrentProcessExplicitAppUserModelID(_WinAPI_CreateGUID()) ; ensure a unique ID, neded for TaskBar icon

TraySetIcon("shell32.dll", 239) ; Set the tray menu icon
GUICreate("My Custom GUI", 300, 200)
GUISetIcon(@SystemDir & "\shell32.dll", 239) ; Set the Window & TaskBar icon icon
GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

 

Edited by ioa747
Link to post
Share on other sites

From what I understand there is not a way to add a custom icon to a3x (specifically for the file itself), as it's a reference to the AutoIt exe/icon. Here's some more information: 

 

 

The best option you're likely to get is to create a shortcut to the .a3x file, and change the icon of that shortcut:

q7AOBzd.png

Edited by mistersquirrle

We ought not to misbehave, but we should look as though we could.

Link to post
Share on other sites

I have used this for almost 10 years now

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=MyApp
#AutoIt3Wrapper_Icon=scriptfd.ico
#AutoIt3Wrapper_Outfile=some.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=Awesome AutoIt script
#AutoIt3Wrapper_Res_Description=Does some magix
#AutoIt3Wrapper_Res_Fileversion=2.0.1.440
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=Mister Skysnake
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%
#AutoIt3Wrapper_Res_Field=#pragma|compile(OriginalFilename,some.exe)
#AutoIt3Wrapper_Res_Icon_Add=other.ico
#AutoIt3Wrapper_Res_Icon_Add=blackbook.ico
#AutoIt3Wrapper_Res_Icon_Add=bluebook.ico
#AutoIt3Wrapper_Res_Icon_Add=purplebook.ico
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 6 -q
#AutoIt3Wrapper_Run_Tidy=y
#Au3Stripper_Parameters=/rm
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

This goes at the top of your script. The icons must be correctly named and present in the local @Script folder

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to post
Share on other sites
1 hour ago, Skysnake said:

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
;...
://////=__=
://////=__=://////==OriginalFilename,some.exe)
;...
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

 

What is this part supposed to be? It just throws errors for me, and I haven't seen something like this before.

 

Also while this will work for outputting a .exe, the question is specifically about .a3x which this won't do anything for (tested compiling after adding: #AutoIt3Wrapper_Outfile_type=a3x and even adding multiple icons with Res_Icon_Add didn't change the filesize from a couple kb ).

Edited by mistersquirrle

We ought not to misbehave, but we should look as though we could.

Link to post
Share on other sites
  • Developers
2 hours ago, Skysnake said:

This goes at the top of your script. The icons must be correctly named and present in the local @Script folder

This will only work when:

  1. You have the full SciTE4AutoIt3 installer installed with AutoIt3Wrapper
  2. You compile to an EXE !   not A3X as that is missing the PE header a program has which contains the ICO info.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
9 hours ago, mistersquirrle said:

What is this part supposed to be? It just throws errors for me, and I haven't seen something like this before.

Hmm. Interesting, that is the way the Forum represents the following directive

#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%
#AutoIt3Wrapper_Res_Field=#pragma|compile(OriginalFilename,some.exe)

Probably the |% screws with the interpreter.

I have changed the code tag above to HTML (it is not HTML but now displays the code correctly)

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to post
Share on other sites
8 hours ago, Jos said:

This will only work when:

  1. You have the full SciTE4AutoIt3 installer installed with AutoIt3Wrapper
  2. You compile to an EXE !   not A3X as that is missing the PE header a program has which contains the ICO info.

Yes Master

Skysnake

Why is the snake in the sky?

Link to post
Share on other sites
  • Developers

mmm   :think: so what exactly does this do?

13 minutes ago, Skysnake said:

#AutoIt3Wrapper_Res_Field=#pragma|compile(OriginalFilename,some.exe)

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers
4 minutes ago, Skysnake said:

From what I see that is a Windows file system parameter, the key is "OriginalFilename" and you can then specify "some.exe"

I have no idea what this all means, but assume that statement is ONLY adding an extra TEXT field to the PE header with that content and nothing else!

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers
17 minutes ago, Skysnake said:

You may be right. 

May? ;)  funny...   

 

18 minutes ago, Skysnake said:

My impression is that Windows does not know what the compiler "Outfile" name means, but is supposed to know what the OriginalFilename means. I am guessing this has to do with Windows Indexes and search. And yes, I am guessing.

Correct .... you are guessing and I have no clue why one would think that Windows can do anything with this. Possibly you are referring to these supported "Variables" by AutoIt3Wrapper directive found in the Helpfile?:

 

Quote

; The following directives can contain: these variables
;   %in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.
;   %scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.
;   %fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive
;   %scitedir% will be replaced by the SciTE program directory
;   %autoitdir% will be replaced by the AutoIt3 program directory

 

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers

Again, what is the relation between an AutoIt3Script that updates an PE header of an Program resource and anything with Windows? 
I realize that the Windows Explorer does use some of the Info in the PE header to display such things as Version and Description.

Looking at your line: 

#AutoIt3Wrapper_Res_Field=#pragma|compile(OriginalFilename,some.exe)

.. there are a number of strange things with it! For starters: Why are you setting a PE field to a AutoIt3 specific #PRAGMA statement? What are you expecting this line to do?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers
9 minutes ago, Skysnake said:

Am I missing something?

Guess so as you are not answering my whole question...   Why #PRAGMA?

.. but when the question is how to set a PE header known fieldname like: OriginalFilename you simply use this format:

#AutoIt3Wrapper_Res_Field=OriginalFilename|"Whatever.exe"

Which works nicely for me:

image.png.af1bc7e075466f0941dcd92c8c9b7ae4.png

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Skysnake
      ; #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
    • By JohnnyTries
      Hi Fellow Automators,
      Long time listener, first time caller. I've resisted posting on the forums as long as possible for fear of public lynching, but I'm stuck and could really use some help.
      Note: If this is the wrong side of the forum for this topic, I apologize.
      I've built a GUI and script to make our lab data collection easier. The app has a number of input boxes and a 'record' button. The user fills out the input boxes with various notes and then presses 'record', which in turn presses 'record' on two other, separate apps simultaneously, pulls those recordings together into one folder, and then takes the text from the input boxes and adds it in a new row at the bottom of an existing .xlsx spreadsheet. Everything works great, except that every time I open the app to start collecting data for the day, the 'headers' for the $aArray are added to a new row and then the text is added below it. Now, if I don't close the app between collections, subsequent 'recordings' are added to the spreadsheet as expected. If I close the app and open it, the 'first' recording of the day adds the headers to a new row. I don't need new 'header' info because I've already got that in row 1 of the spreadsheet.
      If someone could tell me where I'm !#$%ing up, I would greatly appreciate it. 
       
      #RequireAdmin #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Process.au3> #include <FileConstants.au3> #include <WinAPIFiles.au3> #include <DirConstants.au3> #include <Array.au3> #include <AutoItConstants.au3> #include <File.au3> #include <WinAPIShPath.au3> #include <Excel.au3> ;Declaring the $aArray and location of the speadsheet at the top of the script Local $aArray[1][9] = [["TestID","DateTimeStamp","Tamb_C","BGTemp_C", "GasType", "TrueFlow_slm", "Lens-BGDist_in", "Lens-LeakDist_In", "AddNotes"]] Local $sDataFilePath = @ScriptDir & "\Notes\DualCaptureNotes.xlsx" Func CaptureVideo() Global $TestID = GuiCtrlRead($TestIDInput) Global $timestamp = @YEAR & "-" & @MON & "-" & @MDAY & "-" & @HOUR & "-" & @MIN & "-" & @SEC Global $Cam1Dir = "C:\Archive" Global $Cam2Dir = "C:\ALD" ;Capture Cam1 Data WinActivate("Cam1 App") ControlFocus("Cam1 App", "Save",'WindowsForms10.Window.8.app.0.2099316_r7_ad114') ControlSend("Cam1 App", "Save", 'WindowsForms10.Window.8.app.0.2099316_r7_ad114', "{SPACE}") ;Capture Cam2 Data WinActivate("Cam2 App") ControlClick("Cam2 App", "", 'WindowsForms10.Window.8.app.0.1b0ed41_r7_ad122', '', 1, 10, 10) ;Wait to ensure data files have been fully written to their default locations Sleep(2000) ;Self-explanatorily named functions MoveData() RecordNotesToArray() RecordArraytoExcel() WinActivate("DualCapture") EndFunc ;==>CaptureVideo ;Skipping ahead to the .xlsx part.... Func RecordNotesToArray() _ArrayAdd($aArray, GUICtrlRead($TestIDInput) & "|" & $timestamp & "|" & GUICtrlRead($Tamb_CInput) & "|" & GUICtrlRead($BGTemp_CInput) & "|" & GUICtrlRead($GasTypeInput) & "|" & GUICtrlRead($TrueFlow_slmInput) & "|" & GUICtrlRead($Dist_BG_inInput) & "|" & GUICtrlRead($Dist_Leak_inInput) & "|" & GUICtrlRead($AddNotesInput)) EndFunc ;==>RecordNotesToArray() Func RecordArraytoExcel() Local $oExcel = _Excel_Open() Local $oWorkBook If Not FileExists($sDataFilePath) Then $oWorkBook = _Excel_BookNew($oExcel) Else $oWorkBook = _Excel_BookOpen($oExcel, $sDataFilePath) EndIf $oWorkBook.Worksheets("DataTable").Columns("A:I").AutoFit $LastRow = $oWorkbook.ActiveSheet.Range("A1").SpecialCells($xlCellTypeLastCell).Row $Rowrange = "A"&$LastRow+1 Consolewrite($Rowrange & @crlf) _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aArray, $Rowrange) If FileExists($sDataFilePath) Then _Excel_BookSave($oWorkBook) Else _Excel_BookSaveAs($oWorkBook, $sDataFilePath) EndIf _Excel_BookClose($oWorkBook) _Excel_Close($oExcel) EndFunc ;==>RecordArrayToExcel() I appreciate your time and any help you can provide.
       
      Best,
      Johnny
       
    • By HoangDung
      This is the function that returns the result from cmd, initially i connect to the network wait then i make a call to the above _GetDOSOutput($sCommand) function i want to wait 1 period of time netsh wlan connect name="name" actually but after starting to execute the netsh wlan show interfaces command i tried adding a timeout command it seems to have ignored the timeout command?
      #include <WindowsConstants.au3> #include <Constants.au3> Func _GetDOSOutput($sCommand) Run('"' & @ComSpec & '" /c ' & $sCommand, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sOutput = '' Local $iPID = Run('"' & @ComSpec & '" /c ' & $sCommand, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $sOutput &= StdoutRead($iPID, False, False) If @error Then ExitLoop EndIf Sleep(10) WEnd Return $sOutput EndFunc Local $sCommand= 'netsh wlan delete profile name="wait" & netsh wlan connect name="name" interface="Wi-fi" & netsh wlan show interfaces' MsgBox(0,0,_GetDOSOutput($sCommand))  
    • By D3fr0s7
      I'm trying to make one tray item delete another, but when I do this, all tray items that were created after the deleted item don't work as intended, as if their controlID's were all shifted down one value, and their corresponding tray items now (after deletion) run the code of the tray item before it. Am I missing something? Is there a better way to accomplish what I'm trying to do?
      #include <TrayConstants.au3> #include <Array.au3> HotKeySet ( "{ESC}", "Abort" ) Opt ( "TrayMenuMode", 3 ) TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. Global $aTray[8] ; Defines array to hold tray items. $aTray[0] = TrayCreateItem ( "Test 1 (Name Test 5)" ) $aTray[1] = TrayCreateItem ( "Test 2 (Delete Test 5)" ) $aTray[2] = TrayCreateItem ( "Test 3 (Restore Test 5)" ) $aTray[3] = TrayCreateItem ( "Test 4 (Check if Test 5 is blank or space)" ) $aTray[4] = TrayCreateItem ( "Test 5 Delete Me" ) $aTray[5] = TrayCreateItem ( "Test 6 (Check Test 5 Text)" ) $aTray[6] = TrayCreateItem ( "Test 7 (Read Values)" ) $aTray[7] = TrayCreateItem ( "Test 8 (Count Blanks)" ) While 1 Switch TrayGetMsg() Case $aTray[0] ; "Test 1" Change Test 5 Text. If TrayItemGetText ( $aTray[0] ) <> "" Then Global $TrayText = InputBox ( "Test", "Choose text for Test 5", "Test 5 Delete Me" ) TrayItemSetText ( $aTray[4], $TrayText) EndIf Case $aTray[1] ; "Test 2" Deletes "Test 5". If TrayItemGetText ( $aTray[1] ) <> "" Then Global $TrayDeletedName = TrayItemGetText ( $aTray[4] ) TrayItemDelete ( $aTray[4] ) _ArrayInsert ( $aTray, 4 ) EndIf Case $aTray[2] ; "Test 3" Restores "Test 5". If TrayItemGetText ( $aTray[2] ) <> "" Then $aTray[4] = TrayCreateItem ( $TrayDeletedName ) EndIf Case $aTray[3] ; "Test 4" Check if Test 5 value is blank, space, or filled. If TrayItemGetText ( $aTray[3] ) <> "" Then If TrayItemGetText ( $aTray[4] ) = "" Then MsgBox ( 0, "Test", "Test 5 is blank" ) ElseIf TrayItemGetText ( $aTray[4] ) = " " Then MsgBox ( 0, "Test", "Test 5 is not blank (space)" ) Else MsgBox ( 0, "Test", "Test 5 is assigned a value" ) EndIf EndIf Case $aTray[4] ; "Test 5" (Item to test for, during, and after deletion). If TrayItemGetText ( $aTray[4] ) <> "" Then MsgBox ( 0, "Test", "I'm here!" ) EndIf Case $aTray[5] ; "Test 6" Displays Text from Test 5 item. If TrayItemGetText ( $aTray[5] ) <> "" Then $Test5Text = TrayItemGetText ( $aTray[4] ) MsgBox ( 0, "Test", "Test 5 Text: " & $Test5Text ) EndIf Case $aTray[6] ; "Test 7" Displays all item values. If TrayItemGetText ( $aTray[6] ) <> "" Then MsgBox ( 0, "Test", "$aTray[0]: " & $aTray[0] & @CRLF & _ "$aTray[1]: " & $aTray[1] & @CRLF & _ "$aTray[2]: " & $aTray[2] & @CRLF & _ "$aTray[3]: " & $aTray[3] & @CRLF & _ "$aTray[4]: " & $aTray[4] & @CRLF & _ "$aTray[5]: " & $aTray[5] & @CRLF & _ "$aTray[6]: " & $aTray[6] & @CRLF & _ "$aTray[7]: " & $aTray[7] & @CRLF ) EndIf Case $aTray[7] ; "Test 8" Counts all blanks in tray values. If TrayItemGetText ( $aTray[7] ) <> "" Then Global $blankCount = _ArrayFindAll ( $aTray, "" ) If $blankCount = -1 Then If @error = 6 Then MsgBox ( 0, "Test", "Error, No blanks present") EndIf Else MsgBox ( 0, "Test", "# of blanks: " & $blankCount ) EndIf EndIf EndSwitch WEnd Func Abort() Exit EndFunc Here is a test script I created to try to troubleshoot the problem on my own, with no luck. pay specific attention to "Test 2" ($aTray[1]), "Test 5" ($aTray[4]), and how every tray item after "Test 5" ($aTray[4]) behaves after deletion. Clicking "Test 2" will delete tray item "Test 5", after deletion every item runs the code of the tray item that was established before it (ex. "Test 3" and "Test 4" run their respective code, "Test 5" no longer exists, "Test 6" runs "Test 7", "Test 7" runs "Test 8"), and the last item ("Test 8" $aTray[7]) has no effect when the tray item is clicked. 

      I understand that deleting the tray item changes the controlID, but I don't know in what way it does, and therefore how I can fix it to be able to achieve what I want it to. I appreciate any help or guidance with this problem.

      To clarify, what I'm ultimately trying to do is create a 'while' loop with switch case functions that can exist without necessarily being linked to a tray item, so that I can add and delete them at liberty using the script's functions, without having to differentiate switch case functions with if functions (if $aTray[x] exists, then use this set of switch case functions, etc.). 

      Please, I am in pain. Water come school me again pls
    • By PeterVerbeek
      This topic give you access to an AutoIt functions library I maintain which is called PAL, Peter's AutoIt Library. The latest version 1.26 contains 214 functions divided into these topics:
      window, desktop and monitor GUI, mouse and color GUI controls including graphical buttons (jpg, png) GUI numberbox controls for integer, real, binary and hexadecimal input logics and mathematics include constants string, xml string and file string dialogues and progress bars data lists: lists, stacks, shift registers and key maps (a.ka. dictionaries) miscellaneous: logging/debugging, process and system info Change log and files section  on the PAL website (SourceForge).
      A lot of these functions were created in the development of Peace, Peter's Equalizer APO Configuration Extension, which is a user interface for the system-wide audio driver called Equalizer APO.
×
×
  • Create New...