Leaderboard
Popular Content
Showing content with the highest reputation on 01/13/2023 in all areas
-
My take is that you want to "sort by size (number of subfolders) in descending order". For the same number of subfolders, the order of the directories seems random. Func _FolderListToArraySort2($sPath) Local $aFolder = _FileListToArrayRec($sPath, "*", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) ;_ArrayDisplay($aFolder) Local $aSize[UBound($aFolder - 1)][2] For $i = 1 to $aFolder[0] $aSize[$i - 1][0] = $aFolder[$i] StringReplace($aFolder[$i], "\", "\") $aSize[$i - 1][1] = @extended Next _ArraySort($aSize, 1, Default, Default, 1) _ArrayColDelete($aSize, 1, True) ;_ArrayDisplay($aSize) Return $aSize EndFunc About 3 times faster than OP3 points
-
@SOLVE-SMART and @Jos Yes I was trying to obscure the website, but instanthouscall.com is the actual website. They sell a remote access program that I use to support my clients. The purpose of the program I am trying to write is to get the time I've spent connected to each of my clients and transfer it into my billing program. I had not realized that the original website was still there, my apologies. Webpage.com and username:password are simply placeholders. @Danp2, My understanding of INETGET() is to download a file. I'm trying to receive the output of a PHP process which is very different.2 points
-
Looking for a Faster Folder Sorting Solution
SOLVE-SMART and one other reacted to Trong for a topic
Thanks for everyone's help. The purpose of getting the directory tree from the top level is that synology's synchronization software does not work with unicode files and directories (English). So I need to get the folder name and convert unicode characters to ASCII (Vietnamese can do that) I'm pretty bad at logic up it doesn't matter I have 10 or 1000 posts. I am still the same, of course my coding skills have improved a lot and are getting better day by day. But writing and programming is not my main job. I use AutoIt to make my life easier, I haven't made any money from coding. With difficult problems, I am often lazy when I am powerless, I come here and ask my seniors for help, in my free time I also look over and help other friends in my ability.2 points -
Sounds like a bug in the parser/interpreter to me, this is definitely fixable without any syntax change and it should be fixed. Tagging @jpm so that we can get his opinion on the issue as an AutoIt developer2 points
-
Thanks to both for the answers. They both work, sorry I can only accept one.2 points
-
Get HTML Page
SOLVE-SMART reacted to major4579 for a topic
Because previously (using WINHTTP) I was able to select the date and then the info was displayed in a format that I coded for me to use. Now I select the date then I have to wait for the browser to open, and display the results, then I click on the webpage and the program does the rest. Really, (1) I'm just lazy and impatient (2) this is what coding is supposed to do - program the menial tasks. And (3) I was used to the data being downloaded in the background, processed and displayed. I use this program multiple times a week so yes I'd like to code the part that downloads the data.1 point -
My proposal for maps
SOLVE-SMART reacted to jchd for a topic
This is just a common misunderstanding of the priorities between dot and []. In $map1.bar["baz"] the first part evaluated is bar["baz"], which obviously raises an error. There are many possible valid syntaxes: Local $m[], $p[] $m["foot"] = 123 $p["bare"] = $m ConsoleWrite($p.bare.foot & @LF) ConsoleWrite(($p.bare)["foot"] & @LF) ConsoleWrite(($p["bare"]).foot & @LF) ConsoleWrite($p["bare"].foot & @LF) ConsoleWrite(($p["bare"])["foot"] & @LF) ConsoleWrite($p["bare"]["foot"] & @LF) What makes you think that the Map datatype isn't "stable"?1 point -
Looking for a Faster Folder Sorting Solution
Nine reacted to SOLVE-SMART for a topic
Little typo @Nine, line 2 s$Path instead of $sPath. Best regards Sven1 point -
Having a status window always on top, never active
borreo reacted to SOLVE-SMART for a topic
To be honest, I don't see the problem @borreo. Anyways, please try this and tell me please if this fits your expectations and requirements? By the way: No problem with @SW_SHOW 😀 . #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/sf /sv /mo /rm /rsln #include <GUIConstants.au3> HotKeySet('{ESC}', '_DisposeAndExit') Global $hGui, $cLabel Global $iNextPause = 3 _CreateGui() While True _SetLabel() _WaitASecond() _DoSomething() Wend Func _CreateGui() $hGui = GUICreate('StatusBar GUI', 100, 100, Default, Default, -1, $WS_EX_TOPMOST) $cLabel = GUICtrlCreateLabel('Default StatusBar Text', 0, 80, Default, Default, $SS_SUNKEN + $SS_CENTER) GUISetState(@SW_SHOW, $hGui) EndFunc Func _DisposeAndExit() GUIDelete($hGui) Exit EndFunc Func _SetLabel() GUICtrlSetData($cLabel, $iNextPause) EndFunc Func _WaitASecond() Sleep(1000) EndFunc Func _DoSomething() $iNextPause -= 1 If $iNextPause <= 0 Then Send('A') $iNextPause = 3 EndIf EndFunc Best regards Sven1 point -
this seems to work #include <GUIConstants.au3> $Main = GUICreate("StatusBar GUI", 380, 400,-1,-1, -1, $WS_EX_TOPMOST) $label = GUICtrlCreateLabel("Default StatusBar Text", 0, 380, 400, 20, $SS_SUNKEN + $SS_CENTER) GUISetState (@SW_SHOWNA, $Main) $NextPause = 3 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit GUICtrlSetData($label, $NextPause) Sleep( 1000 ) $NextPause = $NextPause - 1 If $NextPause <= 0 Then Send( "A" ) $NextPause = 3 EndIf Wend It is important to use @SW_SHOWNA or @SW_SHOWNOACTIVATE, if you use anything different, it seems to loose the TopMost feature (in my test, not sure why).1 point
-
Script to map Google Drive using API
Musashi reacted to SOLVE-SMART for a topic
Hi @Darien, do you have any tryouts or ideas on your own or do you expect that we do all the work about it? Don't get me wrong, I am very interesting in helping people all the time, but please provide a bit more information, provide own ideas and show a bit more effort. Which resources/references did you already read? Which kind of API do you think of? What exactly do you mean? Please be more precise, thanks 🤝 . Best regards Sven1 point -
If I had to answer it would be simple: know your data and have the lead over the datatypes you deal with. You're the programmer after all, aren't you?1 point
-
My proposal for maps
SOLVE-SMART reacted to water for a topic
In AutoIt it is suggested to use the hungarian notation for variables. Arrays use "a" and Maps use "m" as the the first character. This way it is quite easy to distinguish them.1 point -
New member here and also first post am also having this problem on a fairly fresh install of windows 10 i had as well installed Visual Studio and autohot key which did install something into my right click and had thought it was that, that blocked me but now i know its a registry key, i think i know how my problem arose i first used the portable version of autoit which probably installed the registry keys which was causing my problem or lack of registry keys in my case1 point
-
Au3toCmd -- Avoid false virus positives. (Version: 2022.09.01)
MightyWeird reacted to Skysnake for a topic
Your better AV products handle AutoIt very well. The cheaper / free stuff, like McAfee, Avast, Avira and some others all go nuts when they see AutoIt. Personally I use and recommend ESET NOD32.1 point -
@j0kky - once more I thank you. My first little test run worked beautifully. And on repeated use. Local $handle If FileExists($vidfle) Then $handle = FileOpen($vidfle, 0) ;$size = FileGetSize($vidfle) DllCall("Kernel32.dll", "BOOLEAN", "FlushFileBuffers", "HANDLE", $handle) $size = FileGetSize($vidfle) ;DllCall("Kernel32.dll", "BOOLEAN", "FlushFileBuffers", "HANDLE", $handle) ;$size = FileGetSize($vidfle) FileClose($handle) ; If $size <> 0 Then $size = $size / 1048576 If $size > 999 Then $size = Round($size / 1024, 2) & " Gb" Else $size = Round($size) & " Mb" EndIf GUICtrlSetData($Label_sze, $size) EndIf EndIf Because of timing constraints, I could not use the Call in a loop or with any significant delay (part of a STD_READ loop writing to my own version of a Console). I will now fine tune to see what I can get away with. It's all a bit convoluted, because I code on my WinXP machine, then test and use on my Win 7 Netbook, and the Win XP Laptop just decided to freeze on me during a SciTE save ... it does that once in a while ... getting a bit old in the tooth. So here I am while it takes its sweet time restarting. EDIT Was able to do away with second DLL call and first FileGetSize.1 point
-
Script to map Google Drive using API
SOLVE-SMART reacted to Darien for a topic
I don't have the slightest idea how to do this. I thought someone might already have this ready. If you don't have it, let it go.0 points