-
Posts
1,025 -
Joined
-
Last visited
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
1,054 profile views
ResNullius's Achievements
Universalist (7/7)
9
Reputation
-
clarencemr reacted to a post in a topic: How to make Toast - New version 2 Aug 18
-
How to make Toast - New version 2 Aug 18
ResNullius replied to Melba23's topic in AutoIt Example Scripts
see the example at the bottom of this post: -
MONaH-Rasta reacted to a post in a topic: How to make Toast - New version 2 Aug 18
-
Deye reacted to a post in a topic: Label Automatic Width (Fit Text)
-
TheDcoder reacted to a post in a topic: INItoSQL DB
-
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.
-
coffeeturtle reacted to a post in a topic: How to make Toast - New version 2 Aug 18
-
How to make Toast - New version 2 Aug 18
ResNullius replied to Melba23's topic in AutoIt Example Scripts
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! -
mikkokh reacted to a post in a topic: Help with _WinApi_CreateFile() Function and RAW mode
-
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.
-
@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
-
Gianni reacted to a post in a topic: Want to Connect function to Enter key
-
Writing DPI Awareness App - workaround
ResNullius replied to mLipok's topic in AutoIt Example Scripts
KaFu posted a wrapper for GuiSetFont/GuiCtrlSetFont that has a Dpi Ratio function (by Phillip123Adams) using straight dll call without GDI+. See -
Xandy reacted to a post in a topic: Context Menu on Hotkey
-
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
-
how to determine the "current" GUI? (not "active window")
ResNullius replied to orbs's topic in AutoIt GUI Help and Support
Of course, binhnx is right. My bad for not testing/researching fully... -
how to determine the "current" GUI? (not "active window")
ResNullius replied to orbs's topic in AutoIt GUI Help and Support
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 -
JScript reacted to a post in a topic: AutoIt Snippets
-
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
-
GUIFrame UDF - Melba23 version - 19 May 14
ResNullius replied to Melba23's topic in AutoIt Example Scripts
@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 -
is there such thing as @userpassword ?
ResNullius replied to dirty's topic in AutoIt General Help and Support
@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 -
Is it possible to set the position of FileOpenDialog()?
ResNullius replied to 4Eyes's topic in AutoIt GUI Help and Support
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 -
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.
-
Adding a menu in to a Windows program an using it
ResNullius replied to LeonNic's topic in AutoIt General Help and Support
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.