Yashied Posted December 10, 2013 Author Share Posted December 10, 2013 Links updated.P.S.If you can't download my programs in other posts please change address:http://yashied.narod2.ru/tohttp://yashied.ru/ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Trong Posted March 6, 2015 Share Posted March 6, 2015 >"C:\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\Documents\Downloads\NotifyBox.au3" /UserParams +>01:53:31 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:\AutoIt3\SciTE UserDir => C:\AutoIt3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Trong\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.12.0) from:C:\AutoIt3 input:D:\Documents\Downloads\NotifyBox.au3 +>01:53:31 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\AutoIt3\autoit3.exe "D:\Documents\Downloads\NotifyBox.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "D:\Documents\Downloads\NotifyBox.au3" (179) : ==> Expected a "=" operator in assignment statement.: $__nbId[0][1] += 1 $__nbId^ ERROR ->01:53:32 AutoIt3.exe ended.rc:1 +>01:53:32 AutoIt3Wrapper Finished. >Exit code: 1 Time: 0.621 fix plz Regards, Link to comment Share on other sites More sharing options...
Yashied Posted March 6, 2015 Author Share Posted March 6, 2015 (edited) You have something removed in the code? This error is meaningless. Please show me the code. Edited March 6, 2015 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Trong Posted March 6, 2015 Share Posted March 6, 2015 expandcollapse popup;~ #Include "NotifyBox.au3" Opt('TrayAutoPause', 0) While 1 _NotifyBox(16, ':-(', 'One.', 2) Sleep(500) _NotifyBox(48, ':-|', 'Two.', 2) Sleep(500) _NotifyBox(64, ':-)', 'Three.', 2) Sleep(3000) WEnd #Region Header #cs Title: Management of Message Boxes UDF Library for AutoIt3 Filename: NotifyBox.au3 Description: Creates a message boxes without pausing a script Author: Yashied Version: 1.1 Requirements: AutoIt v3.3 +, Developed/Tested on WindowsXP Pro Service Pack 2 Uses: None Notes: - http://www.autoitscript.com/forum/index.php?showtopic=121609 Available functions: _NotifyBox Example: #Include "NotifyBox.au3" Opt('TrayAutoPause', 0) While 1 _NotifyBox(16, ':-(', 'One.', 2) Sleep(500) _NotifyBox(48, ':-|', 'Two.', 2) Sleep(500) _NotifyBox(64, ':-)', 'Three.', 2) Sleep(3000) WEnd #ce #Include-once #EndRegion Header #Region Local Variables and Constants Dim $__nbId[1][4] = [[0, 1, 0, 0]] #cs DO NOT USE THIS ARRAY IN THE SCRIPT, INTERNAL USE ONLY! $__nbId[0][0] - Number of items in array [0][1] - Timer control flag [0][2] - Handle to the DLL callback function [0][3] - Timer identifier $__nbId[i][0] - Handle to the message box window [i][1] - Timeout, in milliseconds [i][2] - TimerInit() [i][3] - Reserved #ce #EndRegion Local Variables and Constants #Region Initialization OnAutoItExitRegister('__NB_AutoItExit') #EndRegion Initialization #Region Public Functions ; #FUNCTION# ==================================================================================================================== ; Name...........: _NotifyBox ; Description....: Creates, displays, and operates a message box. ; Syntax.........: _NotifyBox ( $iFlags, $sTitle, $sText [, $iTimeOut [, $hParent [, $hInstance [, $iIcon]]]] ) ; Parameters.....: $iFlags - The flag indicates the type of message box and the possible button combinations (see MsgBox()). ; $sTitle - The title of the message box. ; $sText - The text of the message box. ; $iTimeOut - Timeout in seconds. After the timeout has elapsed the message box will be automatically closed. ; The default is 0, which is no timeout. ; $hParent - The window handle to use as the parent for this dialog. ; $hInstance - Handle to the module that contains the icon resource identified by the $iIcon parameter. ; If this parameter is 0, a handle of the file used to create the calling process. ; $iIcon - Identifies an icon resource. $iIcon can be either a string or an integer resource identifier. ; $iIcon is ignored if the $iFlags parameter does not specify the MB_USERICON (128) flag. ; Return values..: Success - Handle to the created message box. ; Failure - 0. ; Author.........: Yashied ; Modified.......: ; Remarks........: None ; Related........: ; Link...........: ; Example........: Yes ; =============================================================================================================================== Func _NotifyBox($iFlags, $sTitle, $sText, $iTimeOut = 0, $hParent = 0, $hInstance = 0, $iIcon = 0) Local $Opt = Opt('WinTitleMatchMode', 3) Local $tMBP = DllStructCreate('uint Size;hwnd hOwner;ptr hInstance;ptr Text;ptr Caption;dword Style;ptr Icon;dword_ptr ContextHelpId;ptr MsgBoxCallback;dword LanguageId') Local $tTitle = DllStructCreate('wchar[' & (StringLen($sTitle) + 1) & ']') Local $tText = DllStructCreate('wchar[' & (StringLen($sText) + 1) & ']') Local $aList1, $aList2 = WinList($sTitle) Local $tIcon, $hWnd = 0, $Error = 0 Local $Ret If ($iIcon) And (BitAND($iFlags, 0x80)) Then If Not IsString($iIcon) Then $iIcon = '#' & $iIcon EndIf $tIcon = DllStructCreate('wchar[' & (StringLen($iIcon) + 1) & ']') If Not $hInstance Then $Ret = DllCall('kernel32.dll', 'ptr', 'GetModuleHandleW', 'ptr', 0) If Not @error Then $hInstance = $Ret[0] EndIf EndIf Else $tIcon = 0 EndIf DllStructSetData($tTitle, 1, $sTitle) DllStructSetData($tText, 1, $sText) DllStructSetData($tIcon, 1, $iIcon) DllStructSetData($tMBP, 'Size', DllStructGetSize($tMBP)) DllStructSetData($tMBP, 'hOwner', $hParent) DllStructSetData($tMBP, 'hInstance', $hInstance) DllStructSetData($tMBP, 'Text', DllStructGetPtr($tText)) DllStructSetData($tMBP, 'Caption', DllStructGetPtr($tTitle)) DllStructSetData($tMBP, 'Style', BitAND($iFlags, 0xFFFFBFF8)) DllStructSetData($tMBP, 'Icon', DllStructGetPtr($tIcon)) DllStructSetData($tMBP, 'ContextHelpId', 0) DllStructSetData($tMBP, 'MsgBoxCallback', 0) DllStructSetData($tMBP, 'LanguageId', 0) Do $Ret = DllCall('kernel32.dll', 'ptr', 'GetModuleHandleW', 'wstr', 'user32.dll') If (@error) Or (Not $Ret[0]) Then ExitLoop EndIf $Ret = DllCall('kernel32.dll', 'ptr', 'GetProcAddress', 'ptr', $Ret[0], 'str', 'MessageBoxIndirectW') If (@error) Or (Not $Ret[0]) Then ExitLoop EndIf $Ret = DllCall('kernel32.dll', 'ptr', 'CreateThread', 'ptr', 0, 'dword_ptr', 0, 'ptr', $Ret[0], 'ptr', DllStructGetPtr($tMBP), 'dword', 0, 'dword*', 0) If (@error) Or (Not $Ret[0]) Then ExitLoop EndIf While 1 Sleep(10) $aList1 = WinList($sTitle) For $i = 1 To $aList1[0][0] For $j = 1 To $aList2[0][0] If $aList1[$i][1] = $aList2[$j][1] Then ContinueLoop 2 EndIf Next $hWnd = $aList1[$i][1] ExitLoop 2 Next WEnd Until 1 Opt('WinTitleMatchMode', $Opt) If Not $hWnd Then Return SetError(1, 0, 0) EndIf If $iTimeOut Then $__nbId[0][1] += 1 $__nbId[0][0] += 1 ReDim $__nbId[$__nbId[0][0] + 1][4] $__nbId[$__nbId[0][0]][0] = $hWnd $__nbId[$__nbId[0][0]][1] = 1000 * $iTimeOut $__nbId[$__nbId[0][0]][2] = TimerInit() $__nbId[$__nbId[0][0]][3] = 0 If Not $__nbId[0][3] Then $__nbId[0][2] = DllCallbackRegister('__NB_TimerProc', 'none', '') $Ret = DllCall('user32.dll', 'uint_ptr', 'SetTimer', 'hwnd', 0, 'uint_ptr', 0, 'uint', 200, 'ptr', DllCallBackGetPtr($__nbId[0][2])) If (@error) Or (Not $Ret[0]) Then DllCallbackFree($__nbId[0][2]) $Error = 1 Else $__nbId[0][3] = $Ret[0] $__nbId[0][1] -= 1 EndIf EndIf $__nbId[0][1] -= 1 EndIf Return SetError($Error, 0, $hWnd) EndFunc ;==>_NotifyBox #EndRegion Public Functions #Region Windows DLL Functions Func __NB_TimerProc() If $__nbId[0][1] Then Return EndIf $__nbId[0][1] += 1 Local $Ret, $Start = 1 While 1 For $i = $Start To $__nbId[0][0] If TimerDiff($__nbId[$i][2]) >= $__nbId[$i][1] Then If WinExists($__nbId[$i][0]) Then DllCall('user32.dll', 'lresult', 'SendMessage', 'hwnd', $__nbId[$i][0], 'uint', 0x0010, 'wparam', 0, 'lparam', 0) EndIf $Start = $i For $j = $i To $__nbId[0][0] - 1 For $k = 0 To 3 $__nbId[$j][$k] = $__nbId[$j + 1][$k] Next Next ReDim $__nbId[$__nbId[0][0]][4] $__nbId[0][0] -= 1 If Not $__nbId[0][0] Then $Ret = DllCall('user32.dll', 'int', 'KillTimer', 'hwnd', 0, 'uint_ptr', $__nbId[0][3]) If (Not @error) And ($Ret[0]) Then $__nbId[0][3] = 0 DllCallbackFree($__nbId[0][2]) Return EndIf EndIf ContinueLoop 2 EndIf Next ExitLoop WEnd $__nbId[0][1] -= 1 EndFunc ;==>__NB_TimerProc #EndRegion Windows DLL Functions #Region AutoIt Exit Functions Func __NB_AutoItExit() $__nbId[0][1] += 1 If $__nbId[0][3] Then DllCall('user32.dll', 'int', 'KillTimer', 'hwnd', 0, 'uint_ptr', $__nbId[0][3]) DllCallbackFree($__nbId[0][2]) EndIf EndFunc ;==>__NB_AutoItExit #EndRegion AutoIt Exit Functions Not Edit Regards, Link to comment Share on other sites More sharing options...
Yashied Posted March 6, 2015 Author Share Posted March 6, 2015 Declare $__nbId before your code. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Trong Posted March 6, 2015 Share Posted March 6, 2015 Declare $__nbId before your code. This is not my code, it is your code. I just downloaded and tested, do not modify the original code. Fix it, I can not edit it. Or I'll find another function. Regards, Link to comment Share on other sites More sharing options...
Developers Jos Posted March 6, 2015 Developers Share Posted March 6, 2015 (edited) Fix it, I can not edit it. Or I'll find another function. Hope this is the result of your lack of English skills as this surely is pretty rude and won't make too many friends. Edited March 6, 2015 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 comment Share on other sites More sharing options...
Moderators Melba23 Posted March 6, 2015 Moderators Share Posted March 6, 2015 (edited) Trong,Firstly, mind your manners:Fix it, I can not edit it. Or I'll find another functionis not the way to speak to a respected member of this community whose coding skills are well-known and far surpass yours. If you were to write your script like this:#include "NotifyBox.au3" ; Your codeyou would not have this problem as the variable would be declared inside the UDF before your code ran. So you have 3 choices: - 1. Place your code after the UDF code - I have tested this and it works.- 2. Write your script as I suggested above rather than adding the UDF code after your test code.- 3. Do as Yashied has suggested and predeclare the variable.All 3 of those will work - No 2 is the best solution. M23 Edited March 6, 2015 by Melba23 Fixed BB tags 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...
Trong Posted March 6, 2015 Share Posted March 6, 2015 First, I want to apologize for my rudeness. UDF is required at the top of the code, to be able to run. (Like #include) If my speech are not welcome, I'll just look and say no more. End, I want to apologize for my rudeness. Jos, You can see my avatar, I think you understand. Regards, Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 6, 2015 Moderators Share Posted March 6, 2015 Trong,Thank you for that - all is forgotten. 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...
zalomalo Posted March 6, 2015 Share Posted March 6, 2015 (edited) Very nice lib, i think its very usefull (by example debug and more). But i think it crash often with present verion of Autoit, in your example Opt('TrayAutoPause',0) While 1 _NotifyBox(16,':-(','One.',2) Sleep(500) _NotifyBox(48,':-|','Two.',2) Sleep(500) _NotifyBox(64,':-)','Three.',2) Sleep(3000) WEnd crash to me before show the first dialog again by the second time of the loop. I see this was a old post, may be things have changed. Thanks a lot anyway, warn us if you have new versions Edited March 6, 2015 by zalomalo My english shucks, i know it. Link to comment Share on other sites More sharing options...
GelatineGurk Posted July 28, 2020 Share Posted July 28, 2020 Hello, I have a question regarding the function WinList, which is used in NotifyBox.au3 on line 149: $TITLE_1 = "[STRING_1] STRING_2 [STRING_3" $TITLE_2 = "[STRING_1] STRING_2 [STRING_3]" $RETVAL = WinList($TITLE_1) $RETVAL = WinList($TITLE_2) Using $TITLE_2 is producing an error code = 1, using $TITLE_1 is creating an array. This is according to the documentation The problem seems to be the last bracket "]" I found this error (?) using the NotifyBox.au3 library, so I put my question to this topic. I am using latest version of AutoIt and Version 1.1 of NotifyBox.au3 Thanks for your help Link to comment Share on other sites More sharing options...
Nine Posted July 28, 2020 Share Posted July 28, 2020 Since the author is not here anymore, I would suggest you make your own modification. If you prefer you could use the following streamlined version of _NotifyBox : #pragma compile(AutoItExecuteAllowed, True) #include <MsgBoxConstants.au3> HotKeySet("{ESC}", _Exit) While 1 _NotifyBox($MB_ICONERROR, ':-(', 'One.', 2) Sleep(500) _NotifyBox($MB_ICONWARNING, ':-|', 'Two.', 2) Sleep(500) _NotifyBox($MB_ICONINFORMATION, ':-)', 'Three.', 2) Sleep(3000) WEnd Func _NotifyBox($iFlag, $sTitle, $sText, $iTimeout = 0, $hWnd = 0) If $iTimeout = Default Then $iTimeout = 0 If $hWnd = Default Then $hWnd = 0 Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(' & $iFlag & ',''' & $sTitle & ''',''' & $sText & ''',' & $iTimeout & ',' & $hWnd & ')"') EndFunc ;==>_NotifyBox Func _Exit() Exit EndFunc ;==>_Exit pixelsearch 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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