Leaderboard
Popular Content
Showing content with the highest reputation on 06/02/2015 in all areas
-
Help with arrays
argumentum reacted to Melba23 for a topic
TheSpannish, The new forum software no longer has that functionality - but if you wish you could amend the thread title by editing the first post. Or argumentum could stop following the thread by using the app at top right. M231 point -
newniman, Not at all involved - in fact very simple. The problem arises because you can only register 1 function for each message - if you try and register 2 the first is overwritten and no longer works. If you look closely at the GUIListViewEx UDF headers you will see that I have thought of this and actually tell you what to do: - If the script already has WM_NOTIFY, WM_MOUSEMOVE or WM_LBUTTONUPhandlers then only set unregistered messages in _GUIListViewEx_MsgRegister and call the relevant _GUIListViewEx_WM_#####_Handler from within the existing handlerSo you need to change the register function to read: _GUIListViewEx_MsgRegister(False)so that you do NOT register the WM_NOTIFY message and then add the UDF handler function inside the existing WM_NOTIFY handler: Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $tNMHDR, $hWndFrom, $iCode ; Call the UDF handler inside the existing one _GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Now everything should work as expected - please ask again if not. M23 P.S. I have been trying for a long time to persuade the powers-that-be to introduce either the ability to register multiple functions to the same message or a standard UDF (several working versions of which exist) allowing this to happen - alas, as yet without success.1 point
-
_GUICtrlComboBox_SetDroppedWidth? https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlComboBox_SetDroppedWidth.htm1 point
-
SQLITE progress handler
argumentum reacted to jchd for a topic
Take your time and don't hesitate to experiment. Experimenting is free and easy: close all connections to the DB properly and copy the file to a work directory (there should be no hot journal file(s), but if there is one or more, copy it/them along. Then download SQLite Expert freeware (link in .sig) and from there on, you can try various options, queries, change the schema easily, all without having to write a single line of AutoIt code. It's always better to decently optimize a DB (schema, data types and queries) rather than having to use acrobatic workarounds in routine use. That's not that argumentum trick is fundamently bad, it's just that it may be not needed at all. Since you say your imports are frequent jobs, it's well worth spending time once for all to carefully examine why it takes time and fix the issue at its root. I suspect something strange because there can't be good reasons for such a time difference between W7 and Vista, barring faulty hardware on one side or quantuum computer on the other! For example, I just ran the following query on a table with 13K rows: select count(*), total(mntfact), total(mntport) from ebayfiches where pays like 'fr' It affected 12904 rows without indices on amount summed up and took 49 ms on my old hardware (no SSD, DB uncached). Another one on a table of Unicode 5.1 characters (19316 rows): select count(*), total(codepoint) from unicodedata where regexp('(?i)letter', charactername) summed up (nonsensical total, but it's just for illustration) 5773 rows using a slow PCRE regexp extension over the all the official Unicode character names and took 43ms (DB also not cached, first run). A last one on a join between two indexed tables of all english and french words (resp. 109582 and 336561) which illustrate how a small difference in the query can lead to runtime disaster: select count(*), total(length(en.mot)) from en join fr on en.mot = fr.mot where regexp('(?i)^[^aeuy]+$', en.mot) -- finds 795 matching words EN = FR in 105ms but select count(*), total(length(en.mot)) from en join fr on en.mot like fr.mot where regexp('(?i)^[^aeuy]+$', en.mot) -- ran like mad for > 5 minutes before I stopped it I use a custom LIKE which uses lower(unaccent()) both custom functions: the indices on mot can't be used, while they are used with the first query.1 point -
simple and beautiful usage thank youuuu!!1 point
-
Visual Image Effect (GUI)
argumentum reacted to GreenCan for a topic
V 1.0.0.1 already implemented. Now possible to Undo filter step by step backward (Photoshop alike undo) Fixed an issue with resetting filter values.1 point -
I'am in the process of updating my UDF. As Debenu add new function to Lite Version, I would like to add new features to my UDF. Currently, however, I focus on improving the current version.1 point
-
Help on a Project
232showtime reacted to water for a topic
You can directly access the values in the array. Cell A1 corresponds to $aResult[0][0] and cell B1 to $aResult[0][1], cell A5 corresponds to $aResult[4][0] and cell B5 to $aResult[4][1].1 point -
Choosing No button for installation of 3rd party Software
evgeny1976 reacted to Bert for a topic
setup.exe /q1 point -
Choosing No button for installation of 3rd party Software
evgeny1976 reacted to 232showtime for a topic
try this: Send("{TAB}") Sleep(100) Send("{Space}")1 point -
Code only 1 GUI should always work #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #AutoIt3Wrapper_Icon=..\Anonymous_emblem.ico #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Add_Constants=n #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region Includes #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #EndRegion Includes Opt('GUIOnEventMode', 1) $Browser = _IECreateEmbedded() #Region GUI $Form1 = GUICreate("Advertise", 402, 122, @DesktopWidth - 870, @DesktopHeight - 550) $Obj1 = GUICtrlCreateObj($Browser, 0, 0, 401, 73) $Button1 = GUICtrlCreateButton("Continue", 312, 88, 81, 25) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState(@SW_SHOW) _IENavigate($Browser, "http://adf.ly/1I5oEA") GUISetOnEvent($GUI_EVENT_CLOSE, "Beenden") GUICtrlSetOnEvent($Button1, "Con") #EndRegion GUI #Region While While 1 $url = $Browser.document.url If $url = "https://www.autoitscript.com/forum/topic/121720-_iecreate-opens-two-windows/" Then GUICtrlSetState($Button1, $GUI_ENABLE) _IENavigate($Browser, "https://www.autoitscript.com/forum/topic/121720-_iecreate-opens-two-windows/") Sleep(1000) EndIf WEnd #EndRegion While #Region Functions Func Con() GUISetState(@SW_HIDE) MsgBox("Survey Acception", "Thanks for completing this little survey", -1) EndFunc ;==>Con Func Beenden() Exit EndFunc ;==>Beenden #EndRegion Functions1 point
-
Func _String_GetFormattedSize($iByteSize, $iRound=2, $sRetFormat=-1) Local $asBytes[9] = [8, 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] ;Last two unreachable ;) Local $iBytes_Val = 2 ^ 10 If $iByteSize < $iBytes_Val Then Return $iByteSize & ' Bytes' Local $iRetFormat_IsString = IsString($sRetFormat) Local $iFor = 1, $iTo = 8, $iStep = 1 If $iRetFormat_IsString Then If Not StringRegExp($sRetFormat, "\A(?i)(KB|MB|GB|TB|PB|EB|ZB|YB)\z") Then Return SetError(1, 0, $iByteSize) Else Local $iFor = 8, $iTo = 1, $iStep = -1 EndIf For $i = $iFor To $iTo Step $iStep If ($iRetFormat_IsString And $sRetFormat = $asBytes[$i]) Or _ (Not $iRetFormat_IsString And $iByteSize >= $iBytes_Val ^ $i) Then Return Round($iByteSize / $iBytes_Val ^ $i, $iRound) & ' ' & $asBytes[$i] EndIf Next EndFunc1 point