topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 16, 2018, 10:25 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nod5 [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 37next
1
it overwrites the files by default if it is already existed in the current folder
I don't think it does, on the contrary in my (quick) tests it silently skips to unzip/move files if another file with the same name exists in the target path. But yes, a complete program should handle such cases by asking the user what to do. However that would take more time, which I don't have for this right now. But someone else might.

2
Hi all. Here is an AutoHotkey prototype. I don't have time to make more of it right now. But maybe someone else takes this to the next level?

Code: Autohotkey [Select]
  1. ;Smarter unzip sketch
  2. ;by nod5  181114
  3.  
  4. ;note: only a sketch/prototype so far
  5. ;todo:
  6. ;- add error checks/handling:
  7. ;   1 unzip errors (paths to long, or whatever)
  8. ;   2 file/folder move errors:
  9. ;     - script currently silently avoids overwrite
  10. ;     - need to add code to prompt user: overwrite yes/no? and react accordingly
  11. ;- must test how reliable the unzip function performs if the zip file is huge, etcetera
  12. ;- notify user while processing (window, tooltip, etcetera)
  13. ;- prevent repeat commands while processing
  14. ;- replace crude F5 refresh with something better, maybe also reselect zip file after refresh
  15.  
  16. #IfWinActive ahk_exe explorer.exe
  17. !#Lbutton::
  18.  
  19. ;get first file in Explorer selection and verify that it is .zip
  20. clip := ClipToVar()
  21. Loop, parse, clip, `n, `r
  22. {
  23.   firstfile := A_LoopField
  24. }
  25. if !FileExist(firstfile) or (SubStr(firstfile,-3) != ".zip")
  26.   return
  27.  
  28. ;unzip to temporary folder
  29. SplitPath, firstfile, , folder, , zipname_noext
  30. tempfolder := folder "\temp_" A_Now
  31. FileCreateDir, % tempfolder
  32. Unzip(firstfile, tempfolder)
  33.  
  34. ;count unzipped files/folders recursively
  35. Loop, Files, % tempfolder "\*.*", FDR
  36. {
  37.   allcount := A_Index
  38.   onlyitem := A_LoopFilePath
  39. }
  40.  
  41. ;count unzipped files/folders at first level only
  42. Loop, Files, % tempfolder "\*.*", FD
  43. {
  44.   firstlevelcount := A_Index
  45.   firstlevelitem  := A_LoopFilePath
  46. }
  47.  
  48. ;case1: only one file/folder in whole zip
  49. if (allcount = 1)
  50. {
  51.   if InStr( FileExist(onlyitem), "D")
  52.   {
  53.     SplitPath, onlyitem, onlyfoldername
  54.     FileMoveDir, % onlyitem, % folder "\" onlyfoldername
  55.   }
  56.   else
  57.     FileMove   , % onlyitem, % folder
  58. }
  59.  
  60. ;case2: only one folder (and no files) at the first level in zip
  61. else if (firstlevelcount = 1) and InStr(FileExist(firstlevelitem), "D")
  62. {
  63.   SplitPath, firstlevelitem, firstlevelfoldername
  64.   FileMoveDir, % firstlevelitem, % folder "\" firstlevelfoldername
  65. }
  66.  
  67. ;case3: multiple files/folders at the first level in zip
  68. else
  69. {
  70.   FileMoveDir % tempfolder, % folder "\" zipname_noext
  71. }
  72.  
  73. ;cleanup temp folder
  74. FileRemoveDir, % tempfolder, 1
  75.  
  76. ;refresh Explorer to show results
  77. If WinActive("ahk_exe Explorer.exe")
  78.   Send {F5}
  79. return
  80.  
  81.  
  82. ;function: copy selection to clipboard to var
  83. ClipToVar() {
  84.   cliptemp := clipboardall ;backup
  85.   clipboard =
  86.   send ^c
  87.   clipwait, 1
  88.   clip := clipboard
  89.   clipboard := cliptemp    ;restore
  90.   return clip
  91. }
  92.  
  93.  
  94. ;function: unzip files to already existing folder
  95. ;zip file can have subfolders
  96. Unzip(zipfile, folder)
  97. {
  98.   psh := ComObjCreate("Shell.Application")
  99.   psh.Namespace(folder).CopyHere( psh.Namespace(zipfile).items, 4|16)
  100. }

3
I don't think there is a built in method in FARR to do that, though I might be wrong.

Here is a workaround where you pass the search string to AutoHotkey which makes it lowercase and runs the search. You can change the alias name, folder path, base URL and so on to fit your use case.

First create the alias
- alias name: _
- RegEx: _(.+)
- Result(s): C:\folder\search_lowercase.exe "$$1"

Next save this code as search_lowercase.ahk, compile it and move to C:\folder\search_lowercase.exe
Code: Autohotkey [Select]
  1. ;Search Google for input parameter string
  2. if A_Args[1]
  3.   Run % "https://www.google.com/search?q=" Format("{:L}", A_Args[1])

4
Find And Run Robot / Re: EditSkinFile is not portable
« on: October 22, 2018, 09:45 AM »
I only tested this quickly but it seems you can manually edit FindAndRunRobot.ini (must close the FARR process first) and change this line
EditSkinFile=C:\Program Files (x86)\FindAndRunRobot\Skins\<skin name>.skn
into
EditSkinFile=Skins\<skin name>.skn
and then that skin will still be applied when you start FARR again.

5
Heya Nod5, I tried to download this again, but all I'm getting is:
Sorry! Download is not available yet.
Hi, thanks for the heads up. Problem fixed now, try downloading again.

6
Finished Programs / Re: DONE: Tally folder contents by file date
« on: September 23, 2018, 04:37 AM »
I could use something like that too so here is an alternative implementation in AutoHotkey

Code: Autohotkey [Select]
  1.  
  2. ;Tally_by_date.ahk
  3. ;by nod5
  4.  
  5. ;- compile it and run from the command line with a folder path as parameter
  6. ;- outputs a date sorted tally of date created for all files in the input folder
  7.  
  8. ; example input: tally_by_date.exe "C:\this folder\folder"
  9.  
  10. ; example output: C:\this folder\folder\Tally_by_date -- 201809220631.txt
  11. ; with the content:
  12. ; 2018-07-23 9
  13. ; 2018-08-03 4
  14. ; ...
  15.  
  16. folder := A_Args[1]
  17.  
  18. if !InStr( FileExist(folder), "D")
  19.   ;not folder
  20.  
  21. f_array := []
  22.  
  23. ;loop over all files in folder, exclude folders and do not recurse
  24. Loop, Files, % folder "\*.*"
  25. {
  26.   ;get date in YYYY-MM-DD format
  27.   FormatTime, date_var, % A_LoopFileTimeCreated, yyyy-MM-dd
  28.   f_array[date_var] := f_array[date_var] ? f_array[date_var] + 1 : 1
  29. }
  30. For key, val in f_array
  31.   out .= key " " val "`n"
  32.  
  33. FileAppend, % out , % folder "\Tally_by_date -- " A_now ".txt"

7
Find And Run Robot / Re: Extension Filtering still shows folders
« on: August 31, 2018, 05:02 AM »
I don't think you can exclude subfolders in the "Search Folders" settings window.

You can do it with a custom search folder and an Alias though. Here is an example

1. create a Search folder.
Directory path:  C:\folder\this
optional file extension restrictions:  sln
optional modifier keyword: my_search_no_folders

2. go to options > alias and create a new Alias.
Alias: my custom search
regular expression: ^(?:m|my) (..*)
results: dosearch -alias +my_search_no_folders $$1 -\


After that you can type m xyz or my xyz into FARR and the results will be a list of files with the string xyz in the name and the extension .sln and that reside in the folder C:\folder\this or its subfolders. The results will not list any folders.

8
The loss of Atom would be no loss for developers.
I and 18% of the SO 2018 survey respondents politely disagree  :)
https://insights.sta...lopment-environments

But it is interesting to see how VS Code has skyrocketed to the top since 2016
https://insights.sta...nments-by-occupation
https://insights.sta...lopment-environments

Anyway, I'm getting off topic here so will go quiet now.

9
It was a public open-source repository before Microsoft bought it.  In other words, prior to their purchase, they already had access to all of the code anytime they pleased.
Not all, since paid GitHub plans also include the option to create private repos.

So far there seem to be no change in how GitHub operates. But it isn't unreasonable to worry about longer term changes. For some such worries, see 
https://developers.s...lash-from-developers 
https://www.nature.c...s/d41586-018-05426-0

I wonder what will happen to GitHub's Atom now given that it is a competitor to Microsoft's Visual Studio Code.

10
I think it is time for me to put my software, Splinter DC Splinter page , into the public domain. I doubt I am ever going to be able to work on/with it, anymore. I would rather have it expanded upon and be bettered by better folks, than me, then to not due to me wanting to keep the source secret. Maybe some type of "centrallized" location that I would be able to visit and see how it is progressing...

Think through if a public domain license is what you want or if some other license is a better fit. https://choosealicense.com/ is a useful resource.

This page https://choosealicense.com/licenses/ places licenses on a spectrum of openness. The Unlicense at the bottom of the page is what many mean by public domain. If you want to ensure ability to access the source code of software derivative of your work then you could pick a more open license than the Unlicense. FWIW I tend to use GPLv3.

It is easy to set up a GitHub account. If you mostly want to do a one time upload of the code to your own repository then you can probably do that through the web interface without even installing a git client.

11
General Software Discussion / Re: Listary 6
« on: August 19, 2018, 02:02 PM »
Does any news about Listary 6 suggest that it will get something akin to FARR's powerful alias system?

12
Thanks for the feedback everyone. I haven't really researched other preexisting tools like this in the Windows space much. Your links will be useful reading.

I now also found a discussion on reddit about Marvin and some there use the term FIM, File Integrity Monitoring, for tools of this kind.

I suppose it remains to be seen if there really is some useful niche left to be filled by creating one more tool.

How big is the set of files you want to monitor? 

Good question! I'm not sure yet. One issue is how to balance between annoyingly distracting notification overload (a big risk with any tool of this type I suspect) and useful prevention of bad effects from mistakes. I do like the idea of a tool that doesn't at the time of edit/move/deletion prevent the action nor require confirmation but instead only notifies of the change at some later time, in order to prevent a mistake from spreading into the backups.

in most cases (and with a proper filter) 'Process Monitor' from SysInternals can show you your (set of) monitored file(s), which process has doing the modifying and when the modifying did occurred. It doesn't prevent any modification though.
Like with my idea with using Everything perhaps a small tool can make effective use of Process Monitor logs instead of doing all that natively.

13
N.A.N.Y. idea: file modification monitor and alert tool.

A Windows version of Marvin ( https://github.com/dgsharpe/marvin ) but with fewer features. Only daily or manually started checks (not realtime), only local notifications (not email/push).

Perhaps simply an AutoHotkey script that makes use of Everything's database and command line tool ( https://www.voidtool...mand_line_interface/ ) to check for changes to a user specified list of files/folders.

Useful as a safety precaution when using non-versioning, mirroring only backup tools like Bvckup2 ( https://bvckup2.com/ ).

Before each backup job, check for unwanted modifications to files/folders on the monitoring list. A scheduled task for daily backups could first run the modification check tool and take conditional action: if no changes to files on the monitoring list then perform backup, else alert the user and postpone backup until manual confirmation.

For example if you accidentally and unknowlingly delete an important folder (on your monitoring list) in Explorer this tool would halt/alert you before you run a mirroring backup job that would delete the important folder also from the backup drive.

14
Find And Run Robot / Re: %cliptext% in farr command line ?
« on: June 26, 2018, 05:36 AM »
Works for me. Doublecheck that you got the path right and put it in quotes
Code: Text [Select]
  1. "C:\Program Files (x86)\FindAndRunRobot\FindAndRunRobot.exe" -search "%cliptext%"

Oh and if you're using AutoHotkey to run the command line remember to escape the percentage characters like so
Code: Text [Select]
  1. "`%cliptext`%"

15
Find And Run Robot / Re: FARR vs LISTARY
« on: June 23, 2018, 05:05 AM »
https://youtu.be/9T9-OtRVeUw
Ok, that was how I guessed it would work. That is not the kind of thing that launcher applications like FARR tend to do. But still a neat feature. I think that kind of sync between File Open and Explorer could be done with AutoHotkey pretty easily. It could probably be done as a Coding Snack or as a small NANY tool.

It is a type of CTRL+F behaviour except that there are many functions preprogramed easily accesible (probably someone could macro them on FARR)
For example when the file is found, one click to store the path or the folder path.
Right. Seems quite useful. But since FARR has other great functionalities, like the powerful and customizable alias system, I don't really see a problem with simply using both side by side.

16
Find And Run Robot / Re: FARR vs LISTARY
« on: June 22, 2018, 04:49 AM »
1- LISTARY integrate directly into window explorer. That means when I type some letters in the explorer, automatically LISTARY take the control and look for what I am searching.

How is that different from Explorer's built in hotkey Ctrl+F to filter search in the active folder?

2- Many times I am in a program and I want to store or open a file. In general I have to navigate through directories to find the place. With LISTARY, if I have the directory open in another windows, just cliking CTRL+Q and the path is transfer to the search windows and I get the file straight forward.

Do you mean that if you have an Explorer window for e.g. C:\folder open and then start a File Open window in some other application then Listary's Ctrl+Q hotkey will browse to C:\folder in the File Open window? That should be fairly easy to do through an Autohotkey script.

17
Find And Run Robot / Re: FARR - Use Hotstring not hotkey
« on: May 14, 2018, 06:05 AM »
Are you really sure the string "xap" will be easier to recall than a hotkey like Pause or Control+Space?

Anyway, I don't think FARR has an option to open through a hotstring. But you can make a hotstring script with AutoHotkey.

:*:xap:: {Pause}

For more details see this help page https://autohotkey.c.../docs/Hotstrings.htm

One trick to learn a new single key hotkey is to tape a small piece of paper to it on the keyboard so you'll recall it at a glance until you have it in muscle memory.

18
Today I had a hard drive crash.. Not fun.
Sorry to hear that. Glad you recovered the files. Thankful for the useful software suggestion!

reminded me how important having full drive images are to making recovery from a crash a painless process.  Because of that, I am going to increase the frequency of my full drive backups from once a month to once a week.
-mouser
What tool do you use for full drive backups?

19
I have the same issue.
To reproduce it in Windows 10 create a link to any .exe in Program Files by holding Alt and click drag the .exe. Search the link in FARR.
For comparison temporarily copy the same .exe to somewhere in Program Files (x86) and make a link to it and search in FARR.

Icons are also incorrect when using #filecontents to display a text string (not a file path) in the way described here. What happens then is that the icon from the results row above it is reused for the #filecontents row.

20
Request: add option that makes the launch and stay open command retain focus on whatever the keyboard input was before, including selection of one item in the results list.

Ctrl+doubleclick currently does that already.

But ctrl+Enter and the context menu command "launch and stay open" doesn't. They force focus to the searchbox.

21
version 180509 released
change: require ctrl+Y as shortcut in Everything for Close File List (old: ctrl+L)
change: parse drive letter from second line of the .efu (old: parse drive from _C in filename)
clarified helpfile

22
I found some, but while researching the topic further, I discovered that Microsoft has a Computer Vision library built in to the UWP SDK.

Whatever works! :Thmbsup:

23
I dabble a bit in OpenCV and Python and have had most help from these three resources

1. https://www.pyimagesearch.com/
A great tutorial and project site with detailed, stepwise explainers of the code. The site has in the last year or so turned more and more to advanced machine learning topics, but check older posts for more introductory examples and projects.

Adrian Rosebrock, the pyimagesearch guy, also has a companion book https://www.pyimages...ctical-python-opencv  that seem useful, though I haven't read it.

2. https://opencv-pytho...ls/py_tutorials.html
Explainers and examples for many basic OpenCV functions in Python.

3. and, of course, https://stackoverflo...tagged/opencv+python

One thing to keep in mind: there are some differences between Python 2 and 3 when it comes to using and installing OpenCV. Last time I checked the most up to date release of OpenCV didn't play nice with with Python 3 in Windows 10.

But if you're on Python 3 you can quickly install a more basic version of OpenCV like so
python -m pip install numpy --upgrade
python -m pip install opencv-python --upgrade

I don't know exactly what that version is missing (the package page is here, https://pypi.org/project/opencv-python/ ) but it has worked well in all my use cases.

24
I'm a little wary of not showing any message if file is not found.  But I could put the error in the status bar, or i could make a #filecontentsi command that is similar but ignores error..
You're right that is probably better. A new #filecontentsifexist (or something like that) would be useful.

One thing I use #filecontents for is to add a status/notification text line in some alias results. For example imagine an alias with 3 alternative backup commands as result. We can with #filecontents add an extra result line that reads a textfile generated by one of those three commands last time it ran. So the results can look something like:

backup command b1
backup command b2
backup command b3
Last run: b1 2018-02-15 success

25
Find And Run Robot / Re: slenderFARR - a new skin for FARR
« on: April 17, 2018, 11:53 AM »
So you would like an option to hide status bar?
Since 2008! ;D FARR once had that option but it was removed due to some negative side effects IIRC. Still would be nice.

I know some don't want the more minimal look but it could appeal to new users who are used to the Windows 10 search UI style and other flat visual styles e.g. Android.

On the same minimalist visuals note: in my first screenshot above the border for the results box is visible. It would look cleaner if that border was visible only when there are any results. IIRC the skinning tool can be used to hide the border all the time or not at all. I'm not sure exactly when that border started appearing without any results. It wasn't there in 2009.

Pages: [1] 2 3 4 5 6 ... 37next