Moderators Melba23 Posted January 18, 2010 Author Moderators Share Posted January 18, 2010 (edited) Final instalment in this saga (I hope!).In this version of the UDF you get the nice-looking "X in a box" if you have WingDings 2 installed or the "back of a bus WingDings" version if not.; See first postSorry for all the confusion. I should have learned by now never to trust MS! All previous posts adjusted.M23Edit: Clear up different versions - see first post for latest Edited January 19, 2010 by Melba23 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...
martin Posted January 18, 2010 Share Posted January 18, 2010 (edited) Final instalment in this saga (I hope!). All previous posts adjusted. M23 Famous last words. Yes, I am very resistant to Bill Gates but not so much that I don't use Windows! My laptop didn't have WIngDings 2 so I installed it then saw that you had made my one-minute-old udf obsolete! But I get C:\Documents and Settings\Martin\Local Settings\Temp\Toast.au3 (245) : ==> Subscript used with non-Array variable.: $sMessage = $aLabel_Pos[0] Edited January 18, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 18, 2010 Author Moderators Share Posted January 18, 2010 martin,I knew I should not have said that! Your problem is actually the StringSize UDF not returning as it should. Could you please post the _Toast_Set and _Toast_Show lines that are giving you the problem and I will see what I can do to resolve it.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...
UEZ Posted January 18, 2010 Share Posted January 18, 2010 It doesn't work with your example from your 1st post! UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
martin Posted January 18, 2010 Share Posted January 18, 2010 martin,I knew I should not have said that! Your problem is actually the StringSize UDF not returning as it should. Could you please post the _Toast_Set and _Toast_Show lines that are giving you the problem and I will see what I can do to resolve it.M23I simply copied the three scripts again ,toast.au3, stringsize.au3 and the example and the example wouldn't run. Do you mean it works for you? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 19, 2010 Author Moderators Share Posted January 19, 2010 martin and UEZ, Apologies. I had already changed the UDF to show optional icons and I posted a amended version of that in the first post, completely forgetting to post the new example script at the same time. First post should now work "out-of-the-box". <fingers crossed emoticon>! It does for me! M23 Note to self: do not edit big posts late at night. 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...
UEZ Posted January 19, 2010 Share Posted January 19, 2010 Now it is working properly again! Thanks, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
dmob Posted January 19, 2010 Share Posted January 19, 2010 (edited) Good work Melba, I have already incorporated this UDF into one my scripts. Thank you for sharing. However, I have a problem: How do I get it to NOT wrap text? I have text that is already pre-formatted, and I just want it displayed in the toast. The StringSize function returns the correct text, but the Toast_Show function somehow wraps the second or third line, no matter how long the text (see attached image). Console Output: StringSize Return: Message From : IBMX40 Time Stamp : 13:18:03 Category : Sessionresume Message : Total Pause Time 23 min 17 sec The icon is sometimes not displayed. Edited January 19, 2010 by dmob Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 19, 2010 Author Moderators Share Posted January 19, 2010 dmob,As I explained in the first post, a Toast has a maximum (and minimum) width setting. I did this to prevent the Toast taking up too much of the screen space when it appeared - I prefer a "boxy" appearance to a "long and flat" one. So even if you have pre-formatted text, the UDF will still try and fit it into the maximum width by wrapping as necessary. If you change the maximum width to a suitably high value, you should be able to display your text as you want it. The line to change is around line 209:Local $iToast_Width_max = 500I am not going to modify the UDF to make this value user-definable - there are quite enough options as it is! But feel free to modify it for your own use if you wish.A tip: if you run your pre-formatted text through StringSize without specifying a max width, the [2] element of the array returned is the width of the text as it stands without wrapping. Add 20 to that value and you have the maximum size of Toast you would need to use (add another 50 if you want an icon as well). Can you post your _Toast_Show lines which do not display an icon? If you are referring to the example - there are some Toasts there which do not have icons (it is optional you know! ).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...
dmob Posted January 19, 2010 Share Posted January 19, 2010 Thanks for your prompt reply (don't you sleep? it's day time here in SA) I was still editing my first post, got distracted, and I submitted not realising you had already replied. I shall try your suggestions. Thank you for sharing your brilliant code. I was busy coding something similar, but yours is much more elegant and professional. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 19, 2010 Author Moderators Share Posted January 19, 2010 dmob,It is day time here in the UK too. And I slept very well last night thanks! elegant and professionalI might even begin to forgive you for winning the final Test if you carry on like that! 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...
trancexx Posted January 19, 2010 Share Posted January 19, 2010 Nice Thank you Melba with 23 following and some pilot I guess on the pic that you took maybe or maybe not No punctuation marks by choice stupid ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Mat Posted January 19, 2010 Share Posted January 19, 2010 NiceThank you Melba with 23 following and some pilot I guess on the pic that you took maybe or maybe notNo punctuation marks by choice stupid He is (or was) the pilot AutoIt Project Listing Link to comment Share on other sites More sharing options...
trancexx Posted January 19, 2010 Share Posted January 19, 2010 He is (or was) the pilot Then it's "maybe not". ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
corgano Posted January 21, 2010 Share Posted January 21, 2010 could you upload this somewhere in a .zip? 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 21, 2010 Author Moderators Share Posted January 21, 2010 corgano, Can you not copy the 3 scripts from the first post and zip them yourself? 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...
dmob Posted January 21, 2010 Share Posted January 21, 2010 I might even begin to forgive you for winning the final Test if you carry on like that! M23Ah yes, that series was a treat.... Link to comment Share on other sites More sharing options...
MerkurAlex Posted January 21, 2010 Share Posted January 21, 2010 Very well done code works great. Will come in handy [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
corgano Posted January 22, 2010 Share Posted January 22, 2010 corgano,Can you not copy the 3 scripts from the first post and zip them yourself?M23Sorry for that, I was feeling especially lazy that day...This UDF is good! It seems to work pretty well, but can you have 2 toasts at the same time? 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 22, 2010 Author Moderators Share Posted January 22, 2010 corgano,can you have 2 toasts at the same time?No. An existing Toast is retracted before a new one is shown. But 2 separate scripts can show Toasts at the same time.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...
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