Jump to content

ResNullius

Active Members
  • Posts

    1,024
  • Joined

  • Last visited

1 Follower

Profile Information

  • Member Title
    Drink Deep, or Taste Not the Pierian Spring
  • Location
    Canada, eh? (that's why I spells culur with a "u")

Recent Profile Visitors

936 profile views

ResNullius's Achievements

Universalist

Universalist (7/7)

8

Reputation

  1. Howdy Saint, I had occasion to test your fine project and I'd like to share a two-line speed up tip that took me a while to discover when I first started with SQLite. I tested your script with the additions on the largest ini file I could find on my system and my log reads as follows: Sorry I don't have a "before" log, I got tired of waiting.... The only problem is that it's so fast your Splash progress messages don't show up properly The "secret"? Add this line after you open your db (line 281 in v 1.4 of your code) $DBhandle = _SQLite_Open($DBfile) ; original code opening db _SQLite_Exec($DBhandle, "BEGIN;") ; <<<< Add this line And add the following line before you close your database (line 360 of your version 1.4 code) _SQLite_Exec($DBhandle, "COMMIT;") ; <<< Add this line _SQLite_Close($DBhandle) ; original code closing db PS: I also had to add a check on reading empty ini sections to prevent the script from crashing (line 327 of your v 1.4 code) $keys = IniReadSection($srcfle, $section) ; original code If Not (IsArray($keys)) Then ContinueLoop ; <<< Insert this line to prevent crashing on reading an empty section $entries = $keys[0][0] ; original code Hope these help, Cheers.
  2. Melba23, Had occasion to make use of your very excellent Toast UDF in a recent project. Don't know if's been addressed in the 14 pages of posts so far, but I required the ability to use specific icons from the compiled exe and so I made a slight modification beginning at line 279 of your source where you check to see if an exe or ico file was passed to the function as the $vIcon parameter. ;Replace lines 279 to 286 in 01 April 17 verion of TOAST.AU3 ;Added by ResNullius to accomodate choice of multiple icons in exe, dll If StringInStr($vIcon, "|") Then $iIcon_Style = StringRegExpReplace($vIcon, "(.*)\|", "") $sDLL = StringRegExpReplace($vIcon, "\|.*$", "") Else ;End Added by ResNullius to accomodate numbered icons in exe Switch StringLower(StringRight($vIcon, 3)) Case "exe", "ico" $sDLL = $vIcon $iIcon_Style = 0 Case "bmp", "jpg", "gif", "png" $sImg = $vIcon EndSwitch EndIf EndIf I call it from the compiled script like this: _Toast_Show(@AutoItExe & "|203", "My Program", "My Message",3) ;or _ToastShow("C:\CoolScripts\MyCoolScript.exe|201","My Cool Script", "My Cool Message",3) The pipe symbol "|" is used to separate the file name from the icon's resource/ordinal name. Not tested extensively, but worked a treat for my purposes. Thanks again for all you do for this community!
  3. OK, found the problem: with versions of AutoIt after 3.3.10.2 you have to do an explicit DllOpen() for setupapi.dll before any of the subsequent DllCall() statements Found the solution in a post by Biatu https://www.autoitscript.com/forum/topic/77731-device-management-api/?do=findComment&comment=1186109 in another thread.
  4. @guinness, Your rewritten script no longer works with the current 3.3.14.2 or beta 3.3.15.0 AutoIt versions. The latest version I can get it to work with is release 3.3.10.2 (I don't have all the betas since then, but the ones I do have don't work either). I've tested on Win 7 Pro x86 and x64 versions on different physical machines.. If you run the script with both using your built in example, you will see that when you hit the _ArrayDisplay($hDriveEject) that some info is missing running with later versions of AutoIt. Further debugging shows that 3.3.10.2 yields the following values in my testing: $aQueryDrive[$DRIVE_EJECT_DEVICEINSTANCE] = USBSTOR\DISK&VEN_KINGSTON&PROD_DATATRAVELER_3.0&REV_PMAP\00147854488EBE51E75C40C2&0 $aQueryDrive[$DRIVE_EJECT_DEVICEINSTANCEPARENT] = 2472 and any AutoIt version after that that yields no values for those: $aQueryDrive[$DRIVE_EJECT_DEVICEINSTANCE] = $aQueryDrive[$DRIVE_EJECT_DEVICEINSTANCEPARENT] = Looks like something failing with the DLL call If $aQueryDrive[$DRIVE_EJECT_DEVICEID] > 0 Then $aReturn = DllCall('setupapi.dll', 'dword', 'CM_Get_Device_IDW', _ 'ptr', $aQueryDrive[$DRIVE_EJECT_DEVICEID], _ 'wstr', '', _ 'ulong', DllStructGetSize($tBuffer), _ ; Was once 1024. 'ulong', 0) but I can't figure it out. Perhaps you can cast your expert eye over it, and confirm whether it is indeed a problem. I seem to recall it stopped working with the 3.3.11.0 beta, but couldn't find anything in the change logs that set would lead me to the solution. Thanks
  5. KaFu posted a wrapper for GuiSetFont/GuiCtrlSetFont that has a Dpi Ratio function (by Phillip123Adams) using straight dll call without GDI+. See
  6. How about something like this, based on Holger's example @ Creates a tray menu that will popup on the screen wherever your cursor is when you press your hotkey combo. I used the concept to create an app that would paste predefined items into different programs #include <Constants.au3> Opt("TrayMenuMode", 1) Opt("WinTitleMatchMode", 4) Global Const $TPM_BOTTOMALIGN = 0x0020 $item1 = TrayCreateItem("item_1") $item2 = TrayCreateItem("item_2") TrayCreateItem("") ; spacer $aboutItem = TrayCreateItem("About") $exitItem = TrayCreateItem("Exit") HotKeySet("^+v", "ShowTrayMenu") ; Ctrl + Shift + V While 1 $Msg = TrayGetMsg() Switch $Msg Case $item1 MsgBox(4096, "", "Item 1...") Case $item2 MsgBox(4096, "", "Item 2...") Case $exitItem ExitLoop Case $aboutItem MsgBox(4096, "Info", "Just for fun...") EndSwitch WEnd Exit Func ShowTrayMenu() Local $stPoint = DllStructCreate("int;int") DllCall("user32.dll", "int", "GetCursorPos", _ "ptr", DllStructGetPtr($stPoint)) DllCall("user32.dll", "int", "TrackPopupMenuEx", _ "hwnd", TrayItemGetHandle(0), _ "int", $TPM_BOTTOMALIGN, _ "int", DllStructGetData($stPoint, 1), _ "int", DllStructGetData($stPoint, 2), _ "hwnd", WinGetHandle("classname=AutoIt v3"), _ "ptr", 0) EndFunc ;==>ShowTrayMenu
  7. Of course, binhnx is right. My bad for not testing/researching fully...
  8. Along the lines of binhnx's solution, but doesn't require creating a dummy control. Does require that at least one control be present on the Gui though... Func _FindCurrentGUI() ;requires at least one control currently exists on the Gui before this function is called Local $hCurrGui = _WinAPI_GetParent(GUICtrlGetHandle(-1)) Return $hCurrGui EndFunc ;==>_FindCurrentGUI
  9. Simplified (?) version of a function originally posted by guinness @ Improvements (?): Does not require Date.au3 include and Date string can be passed with or without separators ConsoleWrite(_IsDateOrAboveEx(@YEAR & "/" & @MON & '/' & @MDAY-3) & @CRLF) ; Returns False ConsoleWrite(_IsDateOrAboveEx(@YEAR & @MON & @MDAY+1) & @CRLF) ; Returns True Func _IsDateOrAboveEx($sDateString) ;Check if a date is equal to/or has passed the current date. ;Pass the string as YYYYMMDD, with or without separators e.g. 20140815 or 2014/08/15, or 2014-08-15, or 2014.08.15 ;Original concept by guinness http://www.autoitscript.com/forum/topic/139260-autoit-snippets/#entry1005153 Return Number(StringRegExpReplace($sDateString, "\D|$", "")) >= NUMBER(@YEAR & @MON & @MDAY) EndFunc
  10. @Melba23, Maybe I'm just daft, but there seems to be a problem with the individual GUI frames created in terms of, shall I say, their "stickiness". If I fire up your "GUIFrame_Example_1.au3" as included in the current download and click and drag say the green background in the upper left frame, the whole thing moves. If I now click and drag on some of the exposed "white" space where the green used to be, I can clcik and drag the whole left half of the GUI, top, bottom, and horizontal split. If I click and drag the red right half of the GUI and then click and drag on the exposed white space there, the Entire inside of the GUI with all dividers and child objects can be dragged around. I have reproduced this problem on two different computers, both running the latest stable build of AutoIt 3.3.8.1. Can you reproduce? If so, is that behaviour by design or is there a bit that hasn't been flipped somewhere. I was looking forward to using this in a new project, but I can't trust my users not to idly click and drag things around Thanks
  11. @dirty, If its any help, this will verify that the credentials inputted match the logged on user: http://www.autoitscript.com/forum/index.php?s=&showtopic=92240&view=findpost&p=663459
  12. You might have a look at MrCreatoR's clever idea for centering a FileOpenDialog which could easily be adapted to positioning it where you want: http://www.autoitscript.com/forum/index.php?showtopic=97919&view=findpost&p=704245
  13. This code fails because if $changer = "A1" or "2B", etc it will tell you it's a number and it's not... ZacUSNYR had the correct reason: FileReadLine returns a string. StringIsDigit() is the correct test.
  14. Are you running Windows 7 by chance? If so, the Calculator window class has changed to "CalcFrame", so you need to replace all instances of "[CLASS:SciCalc]" in the example with "[CLASS:CalcFrame]" to target the correct window.
  15. IIRC Alt+Space is actually the standard shortcut to invoke a window's systemmenu. The App key appears to work differently in different apps when the main window is active: some apps show the systemmenu, others show the same menu you'd get by right-clicking inside the client area.
×
×
  • Create New...