shawnmstout Posted July 25, 2009 Share Posted July 25, 2009 (edited) for some reason my script is not showing up anymore past a certain point, is there a limit to how many lines it will read? once it gets down to line 298 the menu item doesnt show up anymore Reference: Running Processes posted wrong script, look at 2nd Attachment Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 (edited) 2nd Attachment: Line 252 Should of Had a ; before Printing Jobstraymenu.au3 Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 (edited) In Case you want to test it out, attached is a zip file of all includes, the script to run is traymenu.au3 I am also on irc freenode in the autoit channel if you want to ask me any questions or contact me via skype or msn, thanks i really am confused on this oneall_Includes_Plus_Script.zip Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 25, 2009 Moderators Share Posted July 25, 2009 shawnmstout,A quick look at your script suggests to me that you might be running up against a limit on the number of traymenu items - at a rough estimate I reckon you are creating over 2000 of them! That is one big tray menu!I have no idea if AutoIt or Windows has such a limit, but I would strongly suggest changing your code so that you create GUIs to display the necessary data when required rather than creating such a massive menu structure at the outset.M23  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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 shawnmstout,A quick look at your script suggests to me that you might be running up against a limit on the number of traymenu items - at a rough estimate I reckon you are creating over 2000 of them! That is one big tray menu!I have no idea if AutoIt or Windows has such a limit, but I would strongly suggest changing your code so that you create GUIs to display the necessary data when required rather than creating such a massive menu structure at the outset.M23Yeah i figured something like that, havent made any gui's yet, any suggested tutorials?I was hoping to get everything on the menu, but i guess its not possible Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 Are you using the beta of autoit, I tried with 3.3.0.0 and it threw all kinds of errors at me: expandcollapse popupC:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(6,10) : ERROR: can't open include file <memstats.au3> #Include <memstats.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(8,10) : ERROR: can't open include file <config.au3> #Include <config.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(13,10) : ERROR: can't open include file <CompInfo.au3> #include <CompInfo.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(42,38) : WARNING: $drive: possibly used before declaration. $rootShortcut = TrayCreateItem($drive, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(53,48) : WARNING: $name: possibly used before declaration. $ProgramtempDirShortcut = TrayCreateItem($name & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(82,31) : WARNING: $tempDir: possibly used before declaration. ShellExecute($dfile, $tempDir, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(252,10) : ERROR: syntax error Printing Jobs ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(42,38) : ERROR: $drive: undeclared global variable. $rootShortcut = TrayCreateItem($drive, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(90,28) : ERROR: _ComputerGetDrives(): undefined function. _ComputerGetDrives($Drives) ~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(111,23) : ERROR: _ComputerGetBIOS(): undefined function. _ComputerGetBIOS($BIOS) ~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(141,48) : ERROR: _ComputerGetDependantServices(): undefined function. _ComputerGetDependantServices($DependantService) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(154,30) : ERROR: _ComputerGetDesktops(): undefined function. _ComputerGetDesktops($Desktop) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(184,21) : ERROR: _ComputerGetOSs(): undefined function. _ComputerGetOSs($OSs) ~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3 - 10 error(s), 3 warning(s) I can understand the include problems, but the others, like the used before declaration warnings are kinda blatant, unless those variables are created in the includes, if so, they should probably have better names, those look like script level variables instead of UDF variables. also the Syntax error, just requires a ";" at the beginning of the line. Anymore beyond that I can't help with, I can't even get this to run due to the missing includes. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 Are you using the beta of autoit, I tried with 3.3.0.0 and it threw all kinds of errors at me: expandcollapse popupC:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(6,10) : ERROR: can't open include file <memstats.au3> #Include <memstats.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(8,10) : ERROR: can't open include file <config.au3> #Include <config.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(13,10) : ERROR: can't open include file <CompInfo.au3> #include <CompInfo.au3> ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(42,38) : WARNING: $drive: possibly used before declaration. $rootShortcut = TrayCreateItem($drive, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(53,48) : WARNING: $name: possibly used before declaration. $ProgramtempDirShortcut = TrayCreateItem($name & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(82,31) : WARNING: $tempDir: possibly used before declaration. ShellExecute($dfile, $tempDir, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(252,10) : ERROR: syntax error Printing Jobs ~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(42,38) : ERROR: $drive: undeclared global variable. $rootShortcut = TrayCreateItem($drive, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(90,28) : ERROR: _ComputerGetDrives(): undefined function. _ComputerGetDrives($Drives) ~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(111,23) : ERROR: _ComputerGetBIOS(): undefined function. _ComputerGetBIOS($BIOS) ~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(141,48) : ERROR: _ComputerGetDependantServices(): undefined function. _ComputerGetDependantServices($DependantService) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(154,30) : ERROR: _ComputerGetDesktops(): undefined function. _ComputerGetDesktops($Desktop) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3(184,21) : ERROR: _ComputerGetOSs(): undefined function. _ComputerGetOSs($OSs) ~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\temp-traymenu.au3 - 10 error(s), 3 warning(s) I can understand the include problems, but the others, like the used before declaration warnings are kinda blatant, unless those variables are created in the includes, if so, they should probably have better names, those look like script level variables instead of UDF variables. also the Syntax error, just requires a ";" at the beginning of the line. Anymore beyond that I can't help with, I can't even get this to run due to the missing includes. Above you will see an attached zip file of all the includes, im not getting any errors on my end, and im running it from a separate directory using those includes with no errors, can you try to re-run it with the includes and see if you still get the errors? Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 for creating guis use koda, for learning how to work them, I dunno, I'm just learning through Trial and error myself. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 I did a quick syntax check and got this: C:\Documents and Settings\nekkutta\My Documents\AutoIt\all_Includes_Plus_Script\traymenu.au3(289,17) : ERROR: $error previously declared as a 'Const' $error = @error ~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\all_Includes_Plus_Script\traymenu.au3(293,26) : ERROR: _ErrorMsg(): undefined function. _ErrorMsg($ERR_NO_INFO) ~~~~~~~~~~~~~~~~~~~~~~^ this might be causing a hang up in the script, this area is right before you stopped creating tray menu items. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 (edited) I did a quick syntax check and got this: C:\Documents and Settings\nekkutta\My Documents\AutoIt\all_Includes_Plus_Script\traymenu.au3(289,17) : ERROR: $error previously declared as a 'Const' $error = @error ~~~~~~~~~~~~~~~^ C:\Documents and Settings\nekkutta\My Documents\AutoIt\all_Includes_Plus_Script\traymenu.au3(293,26) : ERROR: _ErrorMsg(): undefined function. _ErrorMsg($ERR_NO_INFO) ~~~~~~~~~~~~~~~~~~~~~~^ this might be causing a hang up in the script, this area is right before you stopped creating tray menu items. Updated Document Try this one I Just put that in there to see if i could find an errortraymenu.au3 Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 no Errors, got running Processes, boy oh boy did I get running processes think you got it fixed. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 (edited) no Errors, got running Processes, boy oh boy did I get running processes think you got it fixed.so your seeing Running Processes?i never got it myself. wierdIm Attaching a Tool Tip for All Running Processes i can see it loading on my side, but its not loading the menu "Running Processes" to pick from, see what you get with this Edited July 25, 2009 by shawnmstout Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 (edited) I did make one change, and that is in the includes, if you have all the includes in the same directory as your script, try using "..." instead of <...> the <> point to the autoit includes directory, the "" use a relative path to the script. #Include "Constants.au3" #Include "memstats.au3" #Include "String.au3" #Include "config.au3" #include "ButtonConstants.au3" #include "EditConstants.au3" #include "GUIConstantsEx.au3" #include "WindowsConstants.au3" #include "CompInfo.au3" #include "Array.au3" Edited July 25, 2009 by nekkutta [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 I did make one change, and that is in the includes, if you have all the includes in the same directory as your script, try using "..." instead of <...> the <> point to the autoit includes directory, the "" use a relative path to the script. #Include "Constants.au3" #Include "memstats.au3" #Include "String.au3" #Include "config.au3" #include "ButtonConstants.au3" #include "EditConstants.au3" #include "GUIConstantsEx.au3" #include "WindowsConstants.au3" #include "CompInfo.au3" #include "Array.au3" Didnt make a difference Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 Newest Updated traymenu.au3traymenu.au3 Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 bump; Link to comment Share on other sites More sharing options...
nekkutta Posted July 25, 2009 Share Posted July 25, 2009 it seems to take some time to populate the menu, lol if I click it right after it pops up after it launches it doesn't show the running processes, but if I wait a couple sec it will. maybe you should just use the name field for that menu, since it seems to only scroll a little bit above and below the screen. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 it seems to take some time to populate the menu, lol if I click it right after it pops up after it launches it doesn't show the running processes, but if I wait a couple sec it will. maybe you should just use the name field for that menu, since it seems to only scroll a little bit above and below the screen.I did before, comment everything out exept for the name and i still didnt get a list Link to comment Share on other sites More sharing options...
shawnmstout Posted July 25, 2009 Author Share Posted July 25, 2009 there is some reason why its working on yours but not mine i added before the printing jobs TrayTip("Menu Delayed","Please Wait while its loading",2,16) Sleep(100000) but still its not loading for me, even if i wait 10 minutes Link to comment Share on other sites More sharing options...
GEOSoft Posted July 25, 2009 Share Posted July 25, 2009 bump;Don't bump a post in 6 minutes, read my signature.See the help file >> Appendix >> AutoIt3 Limits/Defaults >> TRAY_MAXITEMS.That 505 is a bit low because I've successfully done it at over 700 but none the less there is an upper limit. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now