-
Posts
7,103 -
Joined
-
Days Won
88
Reputation Activity
-
TheDcoder reacted to coderusa in The Experimental Autoit RPGenerator (IRC MOPRG Project) Python - Autoit - mIRC
Hey guys. Sorry for the lapse in updates. Been pecking away little by little at some RPG stuff, slow progress but still progress. Situation with my daughter is nearing it's foreseeable end, she'll be home in a couple weeks and once she gets settled in and the final motions are filed things will ease up greatly and I'll be able to focus more on RPG stuff and programming stuff in general. I've been jotting things down and working on some little things lately as I've been very busy in life lately, but its been for a good cause and worth the effort!
Do not worry, I've not stopped or forgotten about RPGenerator! Just been slow moving as I've had to move this project down my priority list more than I anticipated.
-
TheDcoder reacted to TheSaint in AutoIt GUI Creators (Designers)
One we overlooked, and have just discovered, has been added to the first post.
July 6, 2020 - ImGui in AutoIt - Advanced UI by thedemons
P.S. A very interesting project, that appeared to have much potential, but sadly the author seems to have disappeared not long after providing.
-
TheDcoder reacted to TheSaint in MD5 Compare
Updated to v1.3, a much improved version. See first post.
-
TheDcoder reacted to tebasuna51 in Overwrite a file without destroying the previous contents
Thanks all. Since my file isn't a text file, I need to open it as $FO_APPEND+$FO_BINARY.
If it opens as a text file by default, writing adds an unwanted extra chr(15) (?).
I use this to change the channel mask (4 bytes) of a wav file (maybe larger than 10 GB). Rewriting the entire file takes time and space.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Yeah, tell me about it.
And my usage essentially hasn't changed, from the first 18 months, where I had no real issue, until now. What has changed, is updates to my device, so clearly they screwed something or the number of ebooks on my device is a factor ... though to be sure, my Kobo device still has much more space free than used.
And as usual, I always treat my devices and drives well, which is carefully. I also never charge my devices, until almost flat ... be that ereader or phone or tablet etc. I eject properly, store and transport properly, etc etc.
My money is on nerdy coders and flawed management as being the real issue ... and I've seen that across many devices.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest v1.4 update now available, see the first post.
Some more improvements came to mind.
Latest Changes
Been busy, so missed doing the v1.3 upload.
For Your Interest
I finally managed to fix all the images on my Kobo device. This involved the images for the newest ebook additions to my device (around five), plus all the side loaded ebooks, where the images were either black & white instead of color or were badly sized, or in many cases, both. I then double checked the lot to be doubly sure all were now present & acceptable. I did that last with my program, and also with my Kobo device.
A Rehash Of My Situation
Latest News
So anyway, I finally had the image situation on my Kobo device, like I wanted.
But then of course, I needed to do a sync, to get my latest ebook purchase.
On this occasion a surprise waited for me ... Sync appeared to be working and actually completed ... WTF ... Why?
The first inkling I had of this, was my latest five acquisitions at Kobo, automatically went into 'Pending' status after the list was updated. They then proceeded to download, one after the other, then the device went into the 'downloading covers' state, which always takes a while to complete, but after several minutes did finish, then it did 'Annotations' etc and then the Sync completed.
WOW ... I could not believe it.
Reflections
So that's it for now, and going forward I will probably only reply further if new revelations come to light, or in response to posts from others.
I will finish up by saying how nice it is to see all the cover images on my Kobo device, when browsing or when putting the device to sleep. It had been too long since that was regularly the case.
Fingers crossed.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest update now available, see the first post.
Sometimes I make myself laugh ... which is probably a good thing.
I can be so sure I've come to end of thinking of new additions and changes, and then something else pops into my brain while asleep or during waking. Such happened today, and so we have another update. Basically, as I was waking, I was contemplating how best to approach working with the Kobo device today. I knew the battery was flat, and that it takes around an hour to charge, so I had that window before I then started getting USB connection issues due to the device being fully charged. So I wanted to make the most of it. That was when it occurred to me that some kind of guide via my program would be helpful in speeding things up etc. That meant having controls (buttons) indicate they were the one to click to get started etc. The first approach I thought of, was using a graphic rectangle around a button, that was colored red, and hide or show that as needed. I'd done that before in a couple of programs, but as I recalled it, it could be a bit tricky ... and I couldn't recall what programs I'd done it to, so would either have to spend time searching for one, or attempt to do it all again from scratch. Then I thought that colored text on the buttons could be almost as effective, so did that instead. Of course, you could color the buttons instead, but you can lose the visual of the push effect.
Latest Changes
Anyway, I did some of that stuff after creating or adding images to my Kobo device.
I managed to process over 100 entries today, and about a third of that was done before implementing the new auto NEXT option.
Aside from one ebook, which I need to redo, all the others worked a treat. I'm not sure what happened with that one ebook, but I had connected my Kobo device via wifi a couple of times since building my working list, and sometimes missing number sub-folders and images on them get created during a sync, so it could be related to that. I used my newish 'Restore' option to reset for that entry, but not yet redone it because my Kobo was fully charged and the USB connection started playing up again.
P.S. At this point I am not sure, if syncing sometimes causes a loss of number sub-folders and thus their contained cover images. In any case, I have been building a record with my program, and so I guess I will see if that ever happens, or is just the result of my device not downloading everything properly from Kobo.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest update now available, see the first post.
If I had only realized, there was so little to do, I would have included the changes in my last update. But I was too tired to investigate anything more yesterday.
Anyway, I checked today, and determined I needed to do very little, to get the FIX COVERS button code up-to-speed.
I've not changed anything substantial in the way it works, just some of the record keeping aspect.
See the following details.
Please be advised though, that I haven't tested the process yet ... not since I last tested at least 10 months ago.
It should work like it did previously, just with extra records.
Some related stuff follows.
This will hopefully be the last update, at least for a while, unless I find a bug.
So I am now seeing my program as version 1, and essentially as a full version, some incomplete aspects aside, which are not a requirement to use the program successfully. As I have stated previously, I probably won't ever complete those lesser aspects ... not unless I find I need to for something.
I now intend to use my program in earnest, which will test all the major elements, including the FIX COVERS button code.
Enjoy!
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest update now available, see the first post.
I did a stack of work today on the program .... then did a stack more.
I started off with some improvements that had occurred to me since yesterday, then discovered a couple of bugs, then thought of some more improvements.
Then I discovered my Kobo device was almost flat, so a good time to work with it and test a bunch of things. That led to me finding things weren't as good as I wanted them to be, and that I hadn't completed some stuff that needed to be. So implemented a bunch of things and kept testing, and decided I needed to do a few more, and before you knew it most of the day had disappeared. Eventually my Kobo device was fully charged and so kept connecting and disconnecting, so no more testing, though I still had a bunch of things to code and test without needing my device.
Latest Changes
While not a huge list, it was a lot of work.
I'm pretty sure I still need to do more, especially as I haven't looked at the FIX COVERS code again, yet ... not for 10 months at least. I imagine the process still works okay, just needs some additional Log file recording (perhaps). and some visual updating to the list etc, and perhaps some other records.
Anyway, I am pleased to say that the many covers created on my Kobo device today, did the job and worked well. Only a few hundred left to do.
Those Fuschia colored rows are successful images copied to my Kobo device. Mostly it was three images per each ebook, but sometimes only one was required. If you look back at a previous screenshot, you can see what has changed.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest update now available, see the first post.
Okay, as I was waking today, it suddenly occurred to me that I had missed a very obvious improvement.
This was a Dropzone for quick and easy renaming and copying of a cover image file, in preparation for the main usage of my program.
So after pondering on how best to do that, with limited GUI space, I did the following ... optionally repurposed the 'Cover Image' preview field.
To do that, you need to enable it via a checkbox on the 'Settings' window.
So basically I did the following.
That means another level of automation, making things quicker and less fiddly etc.
Enjoy!
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Latest update now available, see the first post.
Everything is now in a single ZIP file, including an EXE version.
While the program is still not fully complete, it is complete enough to do what it needs to, and I may never get around to fully implementing the Clone stuff etc.
Here's what I worked on today.
Here's the latest screenshots.
That's it.
Enjoy!
P.S. I am now going to start using my program in earnest, as a lot of cover image files are missing on my Kobo device. It will be a lengthy process though, with most of that taken up with retrieving image files for those ebooks, that luckily exist in my copy of calibre, and using the clipboard button to retrieve text, to rename them appropriately, before moving each image file to the 'Cover Images - Source' folder, and then refreshing the display of that folder content. I have two calibre library folders I need to keep swapping between - Digital Editions, which has all my DRM ebooks from Kobo, plus Kobo (DRM-Free), which is for ebooks that came DRM-Free from Kobo. While the greater number of my Kobo ebooks are in the Digital Editions library folder, I still have a lot in the Kobo (DRM-Free) library folder.
-
TheDcoder reacted to TheSaint in A simple help request
It's a watery based version of ChatGPT in bathers or swimsuit.
-
TheDcoder reacted to TheSaint in A simple help request
You are right.
And I even consulted with ChatGPT back then, but got nowhere.
Maybe I'm a bit smarter now, and perhaps ChatGPT is too.
In any case, we painstakingly worked our way through it all this time, and things were discovered that weren't last time.
The code covered in this topic is only half the Python code. Then ChatGPT and I worked on the other half, and solved that too.
My feedback to ChatGPT was vital, as it allowed it to explore other avenues, which in the end finally resulted in the solution. We went very deep, and I can now claim to have worked successfully with ChatGPT, and that without its help, I would not have succeeded.
As they say, if at first you don't succeed, then try try again.
-
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
Okay, I've now done away with the previously required Python executable and code.
Thanks to my persistence and the heavy lifting of ChatGPT, we finally wrestled a solution using pure AutoIt to get the correct numbered sub-folders for cover images for an ebook. You can read about some of that here.
NOTE - This was based on some Python code I found in a file of my calibre install. The original Python script can be found in the Other Dependencies.zip file.
See the first post for the updated downloads. The Other Dependencies.zip file is now around 7 MB smaller.
P.S. Please note that this has had minimal testing so far.
-
TheDcoder reacted to TheSaint in A simple help request
Yep, I get the same with my version of AutoIt, so it looks like ChatGPT once again is talking out of its posterior.
THANKS.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
I thought I was done tinkering with the program for the day, but apparently not.
I've added an OnTop button and facility.
Clicking the main list continues to select a matching title JPG entry on the 'Cover Images - Source' list, if it can find one, but now if Image 'Source' is selected, that image will auto display in the 'Cover Image' preview field.
Clicking the black & white 'Author' and 'Title' labels now copies their related input field value to the clipboard.
Enable and Disable of controls at startup and loading has been tweaked a bit.
See the first post for the latest update.
-
TheDcoder reacted to TheSaint in Kobo Cover Fixer
A bit of an update, available via the first post.
After a bit of a break, 10 months, I finally played around with the program again, today.
I haven't done much, just mainly improved some things to make them clearer. Having not used it for quite a while, I was getting a little lost on figuring out how to use it, so I needed a refresher course, and that has resulted in me adding some helpful tips etc ... to make it all easier next time after any extended break.
Anyway, I did actually check if it did what I needed it to ... determine image folder numbers, and create such folders and copy correct image files to them ... and it did the job as expected, which is to say, excellently. So I can now finally claim that it works.
I'd put off doing that last, for a few reasons. The biggest one being an incomplete revamp of the program ... which is still the case, but needs must, and I added some helpful information to the program to assist with dealing with some incomplete aspects.
It is also the case, that my USB connection to my Kobo device continues to plague me.
I have been able to determine, that when my Kobo device isn't fully charged, my USB connection is maintained. But the moment it reaches full charge or is full charge, it keeps losing the connection, though after xx amount of times of auto disconnecting and auto connecting, it finally settles down. Clearly there is some flaw in the hardware and or software.
Add to that, the fact the content on my Kobo has continued to grow, and so I had to pick a point where I was ready to update the folder listings etc.
I did all that, because I side loaded a big bunch of ebook files yesterday, and I thought it was time, while I was doing that, to check that my fix for missing number folders and cover images, actually worked. I did the first part of that yesterday, but for one reason or another, the second part did not happen until today.
Alas, my Kobo device charged up all too soon, and it took me ages to overcome the disconnects to complete cloning the Kobo device on my PC. After that I tested that fix for cover images, and I am very pleased to say that it works as hoped. So my program can now do all the really important things ... create the correct number sub-folders and copy image files to them, converting to the right size image on-the-fly (for three images). I can also replace wrong size image files or black and white with color, but that's something I've been able to do anyway, since the early days of the program's development.
As things currently stand, the program is not fully completed, hence no compiled EXE file, but it certainly works well enough to do what is needed.
Enjoy!
P.S. One new thing I added, was a three state checkbox to the right of the NEXT button. You can now do three things with that button, instead of just one. You can still jump to the next 'marked' row (shown in yellow), when the checkbox is un-selected. But now also you can jump to the next entry with less than three cover image files (when ticked) or jump to the first such entry that hasn't already been marked (when a block ... neither selected or un-selected).
-
TheDcoder reacted to coderusa in The Experimental Autoit RPGenerator (IRC MOPRG Project) Python - Autoit - mIRC
Things are going well at home, daughter isn't home with me yet, but in the process (I am allowed visitations at my discretion!). I've been extremely busy with jumping through hoops for the department of child safety, but I'm nearly done with a big chunk of tasks around the house, when completed I'll have some more free time to work on projects. Taking a bit longer than I had hoped for (the things around the house) but its coming along, I actually ended up turning my dining room into another makeshift bedroom, which meant I had to rearrange everything else around the house to make it work lol, but good progress and allowed me to do a deep spring cleaning of the house. 😎
Project updates will be coming! Been itching to get some coding done.
-
TheDcoder got a reaction from alexjordan_now in The Experimental Autoit RPGenerator (IRC MOPRG Project) Python - Autoit - mIRC
Sounds like a cool project
Just wanted to give you some advice regarding the host, free hosts are very shady so be careful with those. Since your project is open-source you can use Tux Family for hosting, they provide their services at no cost for FOSS projects
If you want a generic host I'd recommend Uberspace.de, they have a pay-what-you-want model, so you can pay as low as 1 EUR/month, that's what I use for my hosting since it doesn't really get a lot of traffic. The recommended amount is 5 EUR.
They also do good work by defending free software in actual courts (see the YouTube-DL case in Germany)
-
TheDcoder reacted to UEZ in Win11 Classic Start
Meanwhile also source codes will be classified as malware!
Microsoft Defender Antivirus has detected malware or other potentially unwanted software. For more information please see the following: https://go.microsoft.com/fwlink/?linkid=37020&name=Trojan:AutoIt/Prcablt.SD!MTB&threatid=2147740918&enterprise=1 Name: Trojan:AutoIt/Prcablt.SD!MTB ID: 2147740918 Severity: Severe Category: Trojan Path: containerfile:_C:\Coding\AU3\Internet\Mp3SearchEngine\Mp3SearchEngine v1.0.8.8.au3; containerfile:_C:\Coding\AU3\Tools\WallpaperBank\WallpaperBank v1.0.2.0.au3; file:_C:\Coding\AU3\Internet\Mp3SearchEngine2\Mp3SearchEngine_v2.0.1.1.au3; file:_C:\Coding\AU3\Internet\Mp3SearchEngine\Mp3SearchEngine v1.0.8.8.au3->(UTF-8); file:_C:\Coding\AU3\SystemInfo\CompStats\Computer Stats Utility 2.0.2.0.au3; file:_C:\Coding\AU3\Tools\HTML Imager\HTML Imager v1.0.1.1.au3; file:_C:\Coding\AU3\Tools\HTML Imager\HTML Imager v1.0.1.2.au3; file:_C:\Coding\AU3\Tools\HTML Imager\HTML Imager v1.0.1.3.au3; file:_C:\Coding\AU3\Tools\ImageSplitter\ImageSplitter v1.0.0.7.au3; file:_C:\Coding\AU3\Tools\Mp3SearchEngine\Mp3SearchEngine v1.0.9.2.au3; file:_C:\Coding\AU3\Tools\WallpaperBank\WallpaperBank v1.0.2.0.au3->(UTF-8); Detection Origin: Local machine Detection Type: Concrete Detection Source: System User: NT AUTHORITY\SYSTEM Process Name: C:\Programme\Editor\Notepad3\Notepad3.exe Security intelligence Version: AV: 1.421.1531.0, AS: 1.421.1531.0, NIS: 1.421.1531.0 Engine Version: AM: 1.1.24090.11, NIS: 1.1.24090.11
-
TheDcoder reacted to coderusa in The Experimental Autoit RPGenerator (IRC MOPRG Project) Python - Autoit - mIRC
I can't divulge everything of the meeting with the department of child safety, and will not over the internet, but let's just say today was the first big day of more to come, and tilted greatly in my favor. 😁
-
TheDcoder reacted to coderusa in The Experimental Autoit RPGenerator (IRC MOPRG Project) Python - Autoit - mIRC
Update 1-13-2025
I've finished the basics of the weather/seasonal control system, and so far in testing it works great.
BUT
More delays. On a personal note, a possible life changing situation is upon me, it won't stop development but it's going to delay things quite a bit over the next month or so, especially over the next couple of weeks. I've been notified by my state's department of child safety that my estranged 8 year old daughter is in the midst of a safety concern with her mother's deadbeat boyfriend, and I may -possibly- be getting custody of the child. If that is the case, I'll have to put things on hold for a few weeks to prepare/child proof my home to their department's standards and other facilitation. Hopefully this will be a happy change and I'm really hoping to get custody as her mother has been uncooperative in visitations and such. We'll see what happens....
-
TheDcoder reacted to Musashi in Rename all files in a folder based on the contents of a text file
You are probably confused by the difference between 0-based and 1-based arrays. @TheDcoder has created a helpful tutorial on arrays. This contains, for instance, an explanation of this particular topic.
Excerpt :
UBound returns the no. of elements in an array with the index starting from 1! That's right, you need to remove 1 from the total no. of elements in order to process the array because the index of an array starts with 0! So append a simple - 1 to the statment:
-
TheDcoder reacted to ioa747 in Active_FileDlg
prologue
On the occasion of @TheDcoder post (I wonder if someone can port it to AutoIt )
and because in the past I already had something similar (Active_SaveFileDlg),
( in which I remember making an effort so that it wouldn't catch windows other than Scite's)
So I took it as a challenge.
Of course, since I don't know much, I skipped the extras and stuck to the basics
A brief description
While the script is running in the background when you display the SaveFileDialog or OpenFileDialog window, display a button-icon in the center of the window title.
Click it brings up a list of some favorite path plus the paths from all open folders.
by selecting one of them, WindowDialog goes to the selected path.
Covers almost everything modern SaveFileDialog & OpenFileDialog & SaveFoldeDialog & OpenFolderDialog
and a series of old-style dialogs like Koda, Crimson Editor, IrfanView, etc
Active_FileDlg.au3
#NoTrayIcon ; https://www.autoitscript.com/forum/topic/212478-active_filedlg ;---------------------------------------------------------------------------------------- ; Title...........: Active_FileDlg.au3 ; Description.....: Add All open folder & some extra as contex menu in SaveFileDlg & OpenFileDlg ; AutoIt Version..: 3.3.16.1 Author: ioa747 ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_Res_Description=Add All open folder & some extra as contex menu in SaveFileDlg & OpenFileDlg #AutoIt3Wrapper_Res_ProductName=Active_FileDlg.au3 #AutoIt3Wrapper_Icon=shell32-68.ico #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_Res_Fileversion=0.0.0.5 ;~ #AutoIt3Wrapper_UseX64=y #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <WinAPISysWin.au3> #include <Misc.au3> #include <GuiTreeView.au3> #include <Array.au3> ; Favorites folder Global $aFavFolder[4] $aFavFolder[0] = 3 $aFavFolder[1] = @DesktopDir ; * <--------- Fav1 folder (get one of your own) $aFavFolder[2] = @MyDocumentsDir ; * <--------- Fav2 folder (get one of your own) $aFavFolder[3] = @UserProfileDir ; * <--------- Fav3 folder (get one of your own) _CmdLineWatcher() While 1 _main() Sleep(500) WEnd Exit ;-------------------------------------------------------------------------------------------------------------------------------- Func _main() If WinActive("[CLASS:#32770]") Then Local $hWnd = WinGetHandle("[ACTIVE]") ; checck if gui all redy exist for this Dlg If WinExists("GUI-" & $hWnd) Then Return Local $Executable = @Compiled ? '"' & @ScriptFullPath & '"' : '"' & @AutoItExe & '" "' & @ScriptFullPath & '"' ;specify FileDlg criteria _AddressBarPath($hWnd) If @error Then ; alternative methods ; ### [2] _AltName() Local $sText = WinGetText($hWnd) If StringInStr($sText, "File &name") Then ; FoldersGUI($hWnd, 2) Run($Executable & ' FoldersGUI ' & $hWnd & ' 2') WinWaitActive("GUI-" & $hWnd, "", 5) EndIf ; ### [3] _BrowseForFolder() $sText = WinGetText($hWnd) If StringInStr($sText, "Select a directory") Then ; FoldersGUI($hWnd, 3) Run($Executable & ' FoldersGUI ' & $hWnd & ' 3') WinWaitActive("GUI-" & $hWnd, "", 5) EndIf Else ; ### [1] _AddressBarPath() ; FoldersGUI($hWnd, 1) Run($Executable & ' FoldersGUI ' & $hWnd & ' 1') WinWaitActive("GUI-" & $hWnd, "", 5) EndIf EndIf EndFunc ;==>_main ;---------------------------------------------------------------------------------------- Func FoldersGUI($hWnd, $iFlag) ; $iFlag: 1=_AddressBarPath, 2=_AltName, 3=_BrowseForFolder ; if parameter coming from cmdline as text If Not IsHWnd($hWnd) Then $hWnd = HWnd($hWnd) If Not IsInt($iFlag) Then $iFlag = Int($iFlag) Local $hGUI = GUICreate("GUI-" & $hWnd, 24, 24, -50, -50, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_NOACTIVATE), $hWnd) Local $idDummy = GUICtrlCreateDummy() Local $idButton = GUICtrlCreateButton("contex button", 0, 0, 24, 24, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", -68) Local $idContext = GUICtrlCreateContextMenu($idButton) Local $OpenFolders = _EnumAllOpenFolder() ;If not open folder, just add fav If $OpenFolders[0][0] = 0 Then ReDim $OpenFolders[UBound($OpenFolders) + 1][2] Else _ArrayInsert($OpenFolders, 1, "0|") ; separator EndIf ; Add Fav folder (the numbers on the front don't matter) For $i = 1 To $aFavFolder[0] _ArrayInsert($OpenFolders, 1, $i & "|" & $aFavFolder[$i]) Next $OpenFolders[0][0] = UBound($OpenFolders) - 1 ;_ArrayDisplay($OpenFolders) ; Create Context Menu For $i = 1 To $OpenFolders[0][0] GUICtrlCreateMenuItem($OpenFolders[$i][1], $idContext) Next Local $Wpos = WinGetPos($hWnd) WinMove($hGUI, "", $Wpos[0] + $Wpos[2] * 0.5, $Wpos[1] + 3) Sleep(50) GUISetState(@SW_SHOWNOACTIVATE, $hGUI) WinActivate($hWnd) Local $MsgId While WinExists($hWnd) $Wpos = WinGetPos($hWnd) WinMove($hGUI, "", $Wpos[0] + $Wpos[2] * 0.5, $Wpos[1] + 3) $MsgId = GUIGetMsg() Switch $MsgId Case 6 To $OpenFolders[0][0] + 6 Switch $iFlag Case 1 _AddressBarPath($hWnd, $OpenFolders[$MsgId - 5][1]) Case 2 _AltName($hWnd, $OpenFolders[$MsgId - 5][1]) Case 3 _BrowseForFolder($hWnd, $OpenFolders[$MsgId - 5][1]) EndSwitch Case $idButton GUICtrlSendToDummy($idDummy) Case $idDummy MouseClick("right") EndSwitch WEnd GUIDelete($hGUI) Exit EndFunc ;==>FoldersGUI ;---------------------------------------------------------------------------------------- Func _EnumAllOpenFolder() ; enumerating all open folders Local $oShell = ObjCreate("Shell.Application") Local $sPath, $index = 0 Local $aArray[$oShell.Windows.Count + 1][2] = [["hWnd", "Path"]] For $oWin In $oShell.Windows $index += 1 $aArray[0][0] = $index $sPath = StringTrimLeft($oWin.LocationURL, 8) ; trim 'file:///' $sPath = StringReplace($sPath, "/", "\") $sPath = _UnicodeURLDecode($sPath) $aArray[$index][0] = HWnd($oWin.HWND) $aArray[$index][1] = $sPath Next Return $aArray EndFunc ;==>_EnumAllOpenFolder ;---------------------------------------------------------------------------------------- Func _UnicodeURLDecode($toDecode) Local $strChar = "", $iOne, $iTwo Local $aryHex = StringSplit($toDecode, "") For $i = 1 To $aryHex[0] If $aryHex[$i] = "%" Then $i = $i + 1 $iOne = $aryHex[$i] $i = $i + 1 $iTwo = $aryHex[$i] $strChar = $strChar & Chr(Dec($iOne & $iTwo)) Else $strChar = $strChar & $aryHex[$i] EndIf Next Local $Process = StringToBinary($strChar) Local $DecodedString = BinaryToString($Process, 4) Return $DecodedString EndFunc ;==>_UnicodeURLDecode ;---------------------------------------------------------------------------------------- Func _AddressBarPath($hWnd, $sNewBarPath = "") WinActivate($hWnd) For $i = 1 To 10 Local $hCtrl = ControlGetHandle($hWnd, "", "ToolbarWindow32" & $i) If @error Then ExitLoop Local $sControlText = ControlGetText($hWnd, "", $hCtrl) If StringLeft($sControlText, 9) = "Address: " Then Local $aTextPart = StringSplit($sControlText, ": ", 1) If $aTextPart[0] = 2 Then ; Get AddressBarPath If $sNewBarPath == "" Then Return $aTextPart[2] Else ; Set AddressBarPath ControlCommand($hWnd, "", $hCtrl, "SendCommandID", 1280) Local $sCtrlNN = ControlGetFocus($hWnd) Local $hCtrlHnd = ControlGetHandle($hWnd, "", $sCtrlNN) ControlSetText($hWnd, "", $hCtrlHnd, $sNewBarPath) ControlSend($hWnd, "", $hCtrlHnd, "{ENTER}") Return $sNewBarPath EndIf EndIf EndIf Next ; If Error, return an empty string Return SetError(1, 0, "") EndFunc ;==>_AddressBarPath ;---------------------------------------------------------------------------------------- Func _AltName($hWnd, $sNewBarPath) WinActivate($hWnd) ControlSend($hWnd, "", "", "!n") ; File &name ;File &name: Local $sCtrlNN = ControlGetFocus($hWnd) Local $hCtrlHnd = ControlGetHandle($hWnd, "", $sCtrlNN) ControlSetText($hWnd, "", $hCtrlHnd, $sNewBarPath) ControlSend($hWnd, "", $hCtrlHnd, "{ENTER}") Return $sNewBarPath EndFunc ;==>_AltName ;---------------------------------------------------------------------------------------- Func _BrowseForFolder($hWnd, $sNewBarPath) WinActivate($hWnd) Local $hTView = ControlGetHandle($hWnd, "", "SysTreeView321") Local $aPath = StringSplit($sNewBarPath, "\", 1) ; first find drive (with label) Local $hItemFound = _GUICtrlTreeView_FindItem($hTView, $aPath[1], True) If $hItemFound Then _GUICtrlTreeView_SelectItem($hTView, $hItemFound) Sleep(10) Local $sSPath = $aPath[1] Local $hItemOld = $hItemFound For $i = 2 To $aPath[0] $hItemFound = _GUICtrlTreeView_FindItem($hTView, $aPath[$i], False, $hItemOld) $hItemOld = $hItemFound $sSPath &= "\" & $aPath[$i] If $hItemFound Then _GUICtrlTreeView_SelectItem($hTView, $hItemFound) Sleep(10) Next If $sSPath = $sNewBarPath Then ;ControlSend($hWnd, "", $hTView, "{ENTER}") Return $sNewBarPath EndIf EndFunc ;==>_BrowseForFolder ;---------------------------------------------------------------------------------------- Func _CmdLineWatcher() ; Run('"' & @AutoItExe & '" "' & @ScriptFullPath & '" FoldersGUI ' & $hWnd & ' 1') Local $aArgs = $CmdLine Local $sFunc If $aArgs[0] > 0 Then $sFunc = $aArgs[1] _ArrayDelete($aArgs, 1) $aArgs[0] = "CallArgArray" Call($sFunc, $aArgs) If @error = 0xDEAD And @extended = 0xBEEF Then ToolTip("error !! Function does not exist" & @CRLF & "or wrong number of parameter", Default, Default, @ScriptName, 3) Sleep(4000) ToolTip("") EndIf Exit EndIf EndFunc ;==>_CmdLineWatcher ;----------------------------------------------------------------------------------------
Please, every comment is appreciated!
leave your comments and experiences here!
Thank you very much