topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 26, 2024, 1:33 am
  • Proudly celebrating 15+ 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 - ak_ [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6 7 8 9next
51
Done :) Here is FileNanny 1.3.1 (version number kinda randomly chosen) : [not available]

Changelog :
- if the folder already exists, FileNanny uses it instead of acting lunatic (that's an improvement, isn't it ?).
- added a FileNanny.nfo info file

Source code (as usual, really messy and obscure, even for me) :

;; FileNanny
;; version 1.3.1
;; "Go to your room !"
;; by ak

#SingleInstance ignore
iniFile = %A_ScriptDir%\FileNanny.ini
if 0 = 0
{
gosub CreateGUI
gosub checkboxes
}

else
{
Iniread shiftKey, %iniFile%, options, shiftKey
Iniread similar, %iniFile%, options, similarfiles
GetKeyState kstate, Shift
if (shiftKey = 1 and kstate = "D")
  editFolder = 1
if (shiftKey = 0 and kstate = "U")
  editfolder = 1
Loop, %0%
{
param := %A_Index%
SplitPath param, fileName, dirName, extension, fileNameNoExt
rawName = %fileNameNoExt%
gosub convert
if editFolder = 1
{
  InputBox InputRawName, FileNanny, Name of the folder to create, , 320, 120, , , , , %rawName%
  rawName = %InputRawName%
  if ErrorLevel
    ExitApp
}

dirToCreate = %dirName%\%rawName%
IfNotExist, %dirToCreate%
  FileCreateDir %dirToCreate%.FileNanny
IfExist, %dirToCreate%
  FileMoveDir %dirToCreate%, %dirToCreate%.FileNanny, 1

fileNewName = %rawName%.%extension%
FileMove %param%, %dirToCreate%.FileNanny\%fileNewName%

;; Similar files detection
if (similar = 1)
{
  Loop %dirName%\*.*
  {
    Splitpath A_LoopFilename, , , ,similarNoExt
    if (similarNoExt = rawName)
    {
      FileMove %dirName%\%A_LoopFilename%, %dirToCreate%.FileNanny\%A_LoopFilename%
    }
  }
}
;;
FileMoveDir %dirToCreate%.FileNanny, %dirToCreate%, 1
}
ExitApp
}
return

CreateGUI:
  gui destroy
  RegRead, regTest, HKEY_CLASSES_ROOT, *\shell\FileNanny
  if strlen(regTest) = 0
  {
    button1Text = Add context menu item
    button1Action = addCMI
  }
  else
  {
    button1Text = Remove context menu item
    button1Action = remCMI
  }
 
  sendToFolder = %UserProfile%\SendTo
  ifnotExist %sendToFolder%\filenanny.lnk
  {
    button2text = Add 'Send to' shortcut
    button2action = addST
  }
  else
  {
    button2text = Remove 'Send to' shortcut
    button2action = remST
  }
 
  Gui, Add, Button, x126 y225 w70 h30 gQuit, Quit
  Gui, Add, Tab, x3 y5 w315 h260 vSelectedTab, Configuration|Options
  Gui, Font, s9 w600
  Gui tab, Configuration
  Gui font, norm
  Gui, Add, Button, x90 y65 w140 h30 g%button1Action% vCMIb, %button1Text%
  Gui, Add, Button, x90 y125 w140 h30 g%button2Action% vSTb, %button2Text%
  Gui tab, Options
  if strlen(regTest) = 0
  {
    regTest = n/a
    disabledOrNot = disabled
  }
  Gui, Add, text, x26 y59 w190 h20 vCurrentCMI, Current : %regTest%
  Gui, Add, Button, x226 y55 w70 h20 %disabledOrNot% gchangeCMI vCMIc, Change
  Gui, Add, GroupBox, x16 y35 w290 h50 , Context menu text
  Gui, Add, CheckBox, x16 y95 w300 h30 vshiftKey gini, Holding the Shift key is required to modify `nfolder name before its creation
  Gui, Add, GroupBox, x16 y135 w290 h50 , Convert these to spaces
  Gui, Add, CheckBox, x30 y150 w50 h30 vconvDot gini, .
  Gui, Add, CheckBox, x80 y150 w50 h30 vconvMinus gini, -
  Gui, Add, CheckBox, x130 y150 w50 h30 vconvUnderscore gini, _
  Gui, Add, CheckBox, x180 y150 w50 h30 vconvPercent gini, `%20
  Gui, Add, CheckBox, x16 y195 w300 h30 vsimilar gini, Move similar files
  Gui, Show, h270 w320, FileNanny
return

ini:
Gui submit, NoHide
Iniwrite %shiftKey%, %iniFile%, options, shiftkey
Iniwrite %convDot%, %iniFile%, convert, dots
Iniwrite %convMinus%, %iniFile%, convert, minus
Iniwrite %convUnderscore%, %iniFile%, convert, underscore
Iniwrite %convPercent%, %iniFile%, convert, percent
Iniwrite %similar%, %iniFile%, options, similarfiles
return

checkBoxes:
Iniread shiftKey, %iniFile%, options, shiftKey
Iniread convDot, %iniFile%, convert, dots
Iniread convMinus, %iniFile%, convert, minus
Iniread convUnderscore, %iniFile%, convert, underscore
Iniread convPercent, %iniFile%, convert, percent
Iniread similar, %iniFile%, options, similarfiles
Guicontrol ,,shiftKey, %shiftKey%
Guicontrol ,,convDot, %convDot%
Guicontrol ,,convMinus, %convMinus%
Guicontrol ,,convUnderscore, %convUnderscore%
Guicontrol ,,convPercent, %convPercent%
Guicontrol ,,similar, %similar%
return

convert:
Iniread convDot, %iniFile%, convert, dots
Iniread convMinus, %iniFile%, convert, minus
Iniread convUnderscore, %iniFile%, convert, underscore
Iniread convPercent, %iniFile%, convert, percent
if convDot = 1
  StringReplace rawName, rawName, ., %A_SPACE%, A
 
if convMinus = 1
  StringReplace rawName, rawName, -, %A_SPACE%, A
 
if convUnderscore = 1
  StringReplace rawName, rawName, _, %A_SPACE%, A
 
if convPercent = 1
  StringReplace rawName, rawName, `%20, %A_SPACE%, A
return

ChangeCMI:
RegRead, regTest, HKEY_CLASSES_ROOT, *\shell\FileNanny
transform,eperluette,chr,0x26
Inputbox newCMI, Enter new context menu text, Please choose the text that will appear in the context menu., , , , , , , , %regTest%
If ErrorLevel
{
  return
}
else
{
  RegWrite, REG_SZ, HKEY_CLASSES_ROOT, *\shell\FileNanny, , %newCMI%
  Guicontrol,, currentCMI, Current : %newCMI%
}
return

AddCMI:
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, *\shell\FileNanny, , FileNann&y !
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, *\shell\FileNanny\command, , "%A_ScriptFullPath%" "`%L"
Guicontrol,, CMIb, Remove context menu item
Guicontrol +gremCMI, CMIb
Guicontrol,, currentCMI, Current : FileNann&y !
Guicontrol enable, CMIc
return

RemCMI:
RegDelete HKEY_CLASSES_ROOT, *\shell\FileNanny
Guicontrol,, CMIb, Add context menu item
Guicontrol +gaddCMI, CMIb
Guicontrol,, currentCMI, Current : n/a
Guicontrol disable, CMIc
return

addST:
FileCreateShortcut, %A_ScriptFullPath%, %sendToFolder%\filenanny.lnk
Guicontrol,, STb, Remove 'Send to' shortcut
Guicontrol +gremST, STb
return

remST:
FileDelete, %sendToFolder%\filenanny.lnk
Guicontrol,, STb, Add 'Send to' shortcut
Guicontrol +gaddST, STb
return

Quit:
GuiClose:
GuiEscape:
  ExitApp
return

52
Again, i think i can't do anything about the non-refreshing windows. I even tried to recreate the problem by using Windows Explorer instead of Freecommander and everything worked fine.

About the folder.FileNanny, that is clearly my mistake. Let me explain : if you try to FileNanny a file without extension, then the program will create a folder with the exact same name, which would be confusing. That's why i first create a "name.FileNanny" folder, move the files and then remove the ".FileNanny" from the folder name. The bug you mentionned happens because the folder to be created is already created, so FileNanny treats it like a file and then messes up.

Anyway, i'll fix this, thanks for pointing it out :)

53
Hi TheBigGuy, i'm glad you like the update. About this refreshing thing, i'm pretty sure it has nothing to do with my code, since i don't control the window display.

54
lanux> yes, i thought about splitting the first digit too, but take The Simpsons -> double digit :) I'll find a way.

Version numbering, yes, i'll do that from now on.

55
Oh ok, i get it, sounds like a good idea :) I'll add this feature.

56
Ok, me again.

Here is the last version of FileNanny :

There is now an option to move similar files (same name, different extension). Just double-click FileNanny.exe, go to the "Options" tab and check "Move similar files".

57
Oh, and i forgot to mention that Gothi[c] kindly created me a dcmembers account before i has to ask so the site should be up soon :)

58
Lanux> i'm using Subdude everyday too :) I'm thinking of a new version, with better season/episode recognition, but it's tough because there are so many different patterns (the "401,402,403" being the more problematic).

nogojoe> can you explain your request please ? I'm sorry, i didn't get it :)

TheBigGuy> good karma ? Cool !

Ok i'll add the multiple files thing to the todo list.

One day I hope to be able to do the same myself. Unfortunately I think that day is far in the future, but I can still dream.
About that... Autohotkey is an easy language (with a weird syntax) and you can find very good documentation and help on the internet. I'm really not a programmer but i make little tools with autohotkey so there's no reason you couldn't :)

59
TheBigGuy> glad you like FileNanny :) If by "related files" you mean "files with the same name, extension excepted", then it should be a very simple feature to add.

kartal> At the time, it doesn't work with multiple files. What are you thinking about, putting each selected file in a unique folder or putting all selected files in the same folder ? The first behaviour seems the more appropriate to me and it's a shame it doesn't work already :) I'll look into this.

lanux> Hehe thanks :) I've been thinking about creating of small website for my scripts but i didn't know if it would be useful to anyone. If you say it would be, i guess i have to go and do it :)  I don't remember the way to create a dcmembers website, i think it's somewhere on the forum, i'll check it out.

60
Post New Requests Here / Re: IDEA: Systemwide "Drag & DropZones"
« on: November 03, 2008, 05:41 PM »
That's a very good idea. Could be very useful, especially to people using a sidebar (the zones could be located there).

I'd be interested in such a project because i've recently been trying to detect drag n drop with autohotkey without any success. If we don't manage to do that, i guess we could show the zones when the left button has been pressed for 1 or 2 seconds, something like that.

61
Well, the title says it all :) When Windows starts, there are a few programs i always launch (Firefox, Thunderbird, FeedDemon). I usually use Circle Dock to start them, but every time i click an icon, Circle Dock disappears and i have to call it back. It'd be great if one could middle-click an icon so it launches the shortcut and lets CircleDock visible so you can click another one.

This said, great program ! :)

62
Living Room / Re: Rats! MS Auto Updates Got Me Again!
« on: October 21, 2008, 09:18 AM »
I never had any problem with MS updates either. On the other hand, i got bit by a dog in the street on Christmas night once.

63
I have a question : i'd like to install Ubuntu on my home computer, but i know 8.10 version is coming very soon. So, i need advice.

Should i :

- Install 8.04 and then upgrade to 8.10 when it's released (assuming that upgrading is safe and won't cause any weird problem).
- Wait for 8.10 and then install it.

Thank you :)

64
Don’t be "that guy." Mac users have been this way and the whole routine gets old by the second sentence. Enjoy Linux for what it is — great code, stable OS, fast platform — not for what it’s not (Windows).
-zriddling
Amen :)

That said, i recently installed Ubuntu on my laptop and i'm really glad i did it. It very fast (i could spend hours playing with those elastic windows) and less obscure than i expected. Wine really impressed me too. As i mainly use Photoshop and Flash for work, i never considered using Ubuntu as my main OS but now i've seen both programs running via Wine, i'm actually considering switching to Ubuntu. VirtualBox is pretty impressive too, i loved running XP through Ubuntu (yes, i have simple joys).

65
Living Room / Re: World of Goo - Indie Game with Great Reviews?
« on: October 16, 2008, 10:30 AM »
Is there any way to test the game before actually buying it ?

66
Living Room / Re: How many countries represented here on DC ?
« on: September 27, 2008, 03:55 AM »
FRANCE

67
Yeah, why not ! I just got a WM6 phone (HTC Touch, or HTC Sprint in the US i think) so i'm all for it.

68
Living Room / Re: Flash game : Fantastic contraption
« on: July 25, 2008, 06:01 PM »
I think this is the best flash game i've ever played. Something like this on Nintendo DS would be heaven.

69
Living Room / Re: Flash game : Fantastic contraption
« on: July 25, 2008, 01:57 PM »
Phew, i finally finished last level !
http://FantasticCont....com/?designId=76967

70
Living Room / Re: Flash game : Fantastic contraption
« on: July 25, 2008, 11:17 AM »
Ahahaha jgpaiva that's great :) I'm still trying to finish this level.

71
Living Room / Re: Flash game : Fantastic contraption
« on: July 25, 2008, 06:06 AM »
Heres how I did the "Big Ball" level... :)

http://FantasticCont....com/?designId=68558
Brilliant !

Here's my solution to level 17 : Handling
http://fantasticcont....com/?designId=46114

That was painful.

72
Living Room / Flash game : Fantastic contraption
« on: July 23, 2008, 11:31 AM »
A great physics game : given basic elements (wheels, motors, sticks etc), you have to build a machine that will take an object to a goal. Sounds easy ? It's not ! Sounds boring ? It's NOT !
http://www.fantasticcontraption.com/

If you enjoyed Phun, you should love this game.

73
Living Room / Re: What are your favorite gadgets and gizmos?
« on: July 18, 2008, 01:32 PM »
Bonjour David :)

First of all, i have to admit the joke about homebrew was totally unintentional :-[ Actually i was comparing this item to CycloDS because it's a little device which enhances the joy of using another device (Nintendo DS / Coffee maker). Looks like my subconscious is a lot funnier than myself :)

To answer your question, i bought it at a supermarket (a "Champion", to be exact) but you can find some on eBay.

74
Living Room / Re: What are your favorite gadgets and gizmos?
« on: June 15, 2008, 04:32 PM »
Damn, i already love this thread :) I even wanna buy a Powermate despite the fact that i probably wouldn't have any use for it.

Ok, first, the oldschool non-electronic ones :

tasse.jpg
Well, this is my favourite coffee mug. Why ? Because it looks good, it's the perfect size and the handle feels great. Also, you can put coffee in it and it's delicious.

poub.jpg
Yes, this is a mug too, but i don't put coffee in this one. In this one, i put rubbish. And i love it for the same reasons as the one above, more or less. I bought both of them the same day at a yard sale.

dosette.jpg
"Ok, what is that ?" you may ask. Well, first of all, i don't know about your country but in France, people are getting pretty crazy about coffee machines called "Expresso-makers". It works like this : instead of putting coffee in a filter and waiting forever to enjoy your coffee, you buy single doses (it looks like this), put one in the expresso maker and you have a delicious coffee in a minute. Pros : it's very easy, very quick and the coffee is very good. Con : buying doses is WAY more expensive than buying traditional packs of coffee. This is where the little gizmo pictured above comes and changes your life : you fill it with any kind of coffee you like and put it in the expresso maker and voilà. This is the CycloDS Evolution of coffee makers.


Pilot G-TEC-C4 = best pen ever. I draw a lot. I draw to earn money to buy food and chinese gadgets, but i also draw on my free time, in sketchbooks. This pen took casual drawing to a higher state of pleasure. You put it on a piece of paper, and it draws for you (it works with writing, too). It comes in two diameters : 0.4mm and 0.25mm. You might think it's too thin, but i love to fill pages with microscopic doodles using my 0.25 like a compulsive jerk. I think Moleskine lovers should give it a try.

ds_ooohh.jpg
I second Deozaan on the Nintendo DS Lite, i love mine too (it's covered with an aluminium case bought on Dealextreme). I use a R4 myself, not a CycloDS, and some homebrew softwares are really fantastic. Here's a link to a drawing i did on my DS using Colors.


4-in-1 Stylus Pen : first, i bought it partly because the idea of a "all-in-one" ridiculous pen made me smile. But now, i find myself using the pen to write some quick stuff, playing with the laser when i'm bored, switching the light on to look for stuff in my bag and use the stylus with my DS when i'm tired of the small stylus. It's cheap, it comes with two sets of batteries.

That's it for now ! :)

75
To this day, my account hasn't been upgraded and my e-mail hasn't been answered. Looks like guys at auctionstealer.com steal more than auctions...

Pages: prev1 2 [3] 4 5 6 7 8 9next