topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Sunday April 28, 2024, 7:52 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
151
Finished Programs / Re: SubDude, a subtitle renaming program
« on: August 19, 2007, 04:40 AM »
P.S. a screenshot would be nice..
True, i just added one :) Thanks.

152
Thanks :)

Perry> yeah, i'm really looking forward a new version of LaunchBar Commander :)

PhilBB6> thanks. I tested those applications and none of them really match what i'm looking for. PkMenu and PKLauncher don't seem to allow to add folders in the menus. Quickmenu is almost perfect but there's something that makes it very annoying to use : you can't scroll folders with mousewheel, you have to click the arrows. Actually that's what made me give ShortPopup up.

Something like this, with mousewheel support would be perfect i guess :
Screenshot - 18_08_2007 , 21_48_24_ver001.png

153
Finished Programs / Re: SubDude, a subtitle renaming program
« on: August 18, 2007, 11:13 AM »
PS What do you use for regex searches (just curious)?
If you're asking which function i use : RegExMatch

I use it once to isolate the season+episode string (like "s01e05", matching the regex "s\d+e\d+" ), then in this string, i isolate the episode number (here "05", matching "(?<=e)\d+" ). I have to do this in two steps (i guess) because :
The bad news is that most regex flavors do not allow you to use just any regex inside a lookbehind, because they cannot apply a regular expression backwards. Therefore, the regular expression engine needs to be able to figure out how many steps to step back before checking the lookbehind.

Therefore, many regex flavors, including those used by Perl and Python, only allow fixed-length strings. You can use any regex of which the length of the match can be predetermined. This means you can use literal text and character classes. You cannot use repetition or optional items. You can use alternation, but only if all options in the alternation have the same length.

So i can't look for "(?<=e)\d+" directly on the filename and not expect to get weird results (for example, if the serie's called "AirForce1", the last two letters would match). Maybe there's another solution, i dunno, i just learnt regex yesterday :)

154
Finished Programs / Re: SubDude, a subtitle renaming program
« on: August 18, 2007, 10:35 AM »
Actually, i forgot to say something in my previous message.

To detect episode number, i use regular expressions* based of what i've found in different filenames. Until now, i've seen these templates :

  • sseasoneepisode
  • seasonxepisode
  • EPepisode
  • sseason.eepisode

I don't know if many of you use subtitle files, but if you've ever encountered another template, please tell me know so i'll add it in the ini file. Thanks :)

* actually, this project was an opportunity for me to learn about regular expressions and i've been pleased to see that it was less complicated that expected.

155
In this topic, IceKin points out Pane Killer, which basically looks like a flyout Start Menu. As i have recently bought a mouse with multiple buttons, i'd like to use one to quickly display a small start menu at mouse cursor position. However, i have two problems with Pane Killer :
- it's ugly
- it's not freeware
Not being freeware is not a problem, but i'm pretty sure there are similar freeware applications out there.

I tried MenuApp, but weirdly it randomly crashes on my computer.

Any help will be appreciated :)

156
General Software Discussion / Re: Double Right Click Start Menu
« on: August 17, 2007, 08:40 PM »
You could even make a simple ahk script that would send Ctrl Click whenever you press the 3rd button of the mouse. It's even simpler if the mouse driver allows combination of keys directly.

157
Finished Programs / SubDude, a subtitle renaming program
« on: August 17, 2007, 06:00 PM »
Here's a little program i made for myself to automatically rename subtitles files to match video files because i was tired of doing it by hand. I guess this program will not be very useful to english-speaking people but it might be to the others.

Here's the situation : you have a folder containing a few episodes or a whole season of a (100% free to download :-[) tv show. You download subtitles files for it and you realize the names of the of the video files and the names of the subtitles files don't match (ie Serie.s01e12.avi & Serie1x12.srt). If you want your media player to automatically load subtitles, you have to rename every subtitles files by hand.

Now, here's SubDude !

Just give SubDude a folder (by using the gui, context-menu or 'Send to') and he will check every video file and look for a corresponding subtitle, and rename it. If you don't trust SubDude, you can tell him to generate an "UnDude" file so you can revert changes in case things were done the wrong way.

subdude.zip

Known restrictions :
  • SongDude assumes all files are from the same season and doesn't check this. Maybe i'll add this in a future version
  • If two subtitles files are matching, they will be renamed consecutively so one of them will be crushed (and this won't be undoable)
Any feedback or bug report will be appreciated :)

subdude_shot.jpg

The ahk source is available here but i'm afraid it's very messy and undocumented.
subdude.ahk

158
Living Room / Re: Request for AHK help...I feel so dumb...
« on: August 16, 2007, 10:56 PM »
You're welcome :)

By the way, i found out that this has the same result and takes less code :
Loop %ProgramFiles%\Dr. Windows\*.exe
{
  FileList = %A_LoopFileLongPath%`n%FileList%
}
StringSplit File, FileList, `n
random rnd, 1, %File0%
Run % File%rnd%

I didn't know about this "% " thing and it's very convenient.

159
Living Room / Re: Request for AHK help...I feel so dumb...
« on: August 16, 2007, 05:27 AM »
Here's how i would do it :
Activate:
Loop %ProgramFiles%\Dr. Windows\*.exe
{
  FileList = %A_LoopFileLongPath%`n%FileList%
}
StringSplit File, FileList, `n
random rnd, 1, %File0%
fileToRun = File%rnd%
fileToRun := %fileToRun%
Run %fileToRun%

Maybe there's a simpler solution but it works.

160
First of all, thanks a lot everybody for taking some time to solve this problem, i really appreciate.

A Quote from the lilyview website, maybe its a photoshop feature?

Photoshop uses a own color management system and includes some additional tags to any written TIFF. These tags are private, registered to Adobe and not well documented. So any other application that tries to read those TIFF's has a problem in interpreting the colors correctly (or lets say in the same way Photoshop does).
But also Photoshop has a problem (and this is not only my private oppinion, for more information you may have a look at Google Groups Graphics because I think Photoshop does wheight the "green" to much and the "blue" to less.
Also some pictures from the "SGI Tiff Test Suite" and CMYK images created by other image processing applications do definitely look "wrong" when loaded into Photoshop.

Maybe this is an explanation. I've tried the applications listed here and i think i'll never see the end of this problem. Indeed, even if some applications displays cymk_test.jpg right, it fails displaying the orignal TIF or PSD files correctly (which is my main concern actually).

I guess Adobe is really messing with those files so the problem seems quite unsolvable.

161
Thanks a lot for your answers. Howerver, still, nothing's working.

nudone> thanks for taking the time to do these tests. I tested Dopus and it didn't display the image correctly. I don't have Adobe Bridge so i can't test it.

philB66> nope, LilyView doesn't do the job either.

Here is an image that can be used to make some tests :
* cmyk_test.jpg (93.65 kB. 406x377 - viewed 1081 times.)
(edit : i changed the post so now there's a direct link to the image)

And here's the difference between real colors and false ones :
cmyk_mess.jpg

162
Thanks guy. However it's not exactly what i want. I'm really looking for software like XnView, IrfanView, Acdsee who correctly displays CMYK colors. Not a image editing software like GIMP etc (i already have that).

Actually i think such software doesn't exist, it's a shame :(

163
I hope i'll be able to add icons and context-menu support in a future version :)

164
I'm actually using XnView as an image viewer and it has every feature i want (even more). The only problem is that it doesn't support CMYK images (like every image viewer i tested so far). It's a shame because i work on CMYK images every day.

So my question is : do you know a good (freeware) image viewer which displays correctly CMYK images ?

Thanks :)

165
General Software Discussion / Re: Top 3 programs you use
« on: August 09, 2007, 09:19 AM »
5. CLCL
6. QuickDic
What are those ?

166
Site/Forum Features / Re: compose hotkeys
« on: August 09, 2007, 08:47 AM »
Maybe a greasemonkey script exists...

I think i'll make the ahk script for myself anyway :D

167
lanux> maybe you can set a timer to count words every second, or every two seconds. Couldn't it work ?

168
Site/Forum Features / Re: compose hotkeys
« on: August 09, 2007, 08:35 AM »
fodder> how about an AHK script with customizable hotkeys ? It shouldn't be too difficult, i already use one to handle [url=][/url] code. I'm willing to try that if it looks like a good solution to you.

169
General Software Discussion / Re: Top 3 programs you use
« on: August 09, 2007, 06:13 AM »
Hmmm, only three, tough one... Let's say :

  • Photoshop
  • Firefox
  • Autohotkey (because i use it to enhance other programs i use, including Photoshop)

And FARR to launch all of the above (and more) :D

170
Just one thing.. Could you post the ahk source?
So that other people can learn with your expertise ;)
Of course ! I always hesitate before posting my sources because i feel that my code is quite messy.

Here it is :
; FileDraft
#NoTrayIcon
if 0 < 2
  ExitApp
 
WorkRep = %1%
StringCaseSense off
StringReplace WorkRep, Workrep, <desktop>, %A_Desktop%
StringReplace WorkRep, Workrep, <user>, %UserProfile%
StringReplace WorkRep, Workrep, <windir>, %A_Windir%
StringReplace WorkRep, Workrep, <mydocs>, %A_MyDocuments%
NFiles = %2%

Loop, %WorkRep%\*.*, 0
    FileList = %FileList%%A_LoopFileTimeModified%`t%A_LoopFileName%`n
Sort, FileList, R  ; Sort by date.

z = 1
Loop, parse, FileList, `n
{
    StringSplit, FileItem, A_LoopField, %A_Tab%  ; Split into two parts at the tab char.
    Menu, Fichiers, Add, %FileItem2%, LaunchFile
    if z = %NFiles%
      break
    z++
}

Menu, Fichiers, Show
return

LaunchFile:
run %WorkRep%\%A_ThisMenuItem%
ExitApp
return

171
This is a small ahk script i made for myself because i was looking for a way to easily access my latest downloads. Today i thought that maybe it could be useful to other people so i made little modifications and improvements and here it is.

* fileDraft.exe (292.56 kB - downloaded 1929 times.)

Here's how fileDraft works : put fileDraft.exe anywhere and create a shortcut to this exe with two parameters. First one is the folder you want to browse, second one is the number of files you want to display.

Example :
  • c:\fileDraft\fileDraft.exe "c:\downloads" 10 will display a menu showing the 10 most recent files in c:\downloads

FileDraft accepts a few keywords :
- <desktop> : desktop folder
- <user> : your "user folder" (i.e c:\documents and settings\username)
- <mydocs> : "My documents" folder
- <windir> : Windows folder

Examples :
  • c:\fileDraft\fileDraft.exe "<mydocs>\Torrent Downloads" 5 will display a menu showing the 5 most recent files in the "My Documents\Torrent Downloads"
  • c:\fileDraft\fileDraft.exe "<desktop>" 20 will display a menu showing the 20 most recent files on your desktop

The best way to use fileDraft is to place the shortcut on a toolbar or in the quicklaunch bar.

I hope someone will find it useful :)

172
I recommand this ahk script because it uses the middle-click button, which is very convenient. There are a few modified versions on the ahk forums. I modified it myself so it ignores clicks on titlebar.

173
Grorgy> that's really weird, i don't see where the problem could be coming from. As you can see, the button is big enough to hold the text and there's no funny caracters in its label. Did you ever have a problem like this in other programs ?

If someone has the same problem, please let me know.

Armando> merci :)

Maybe someone will be interested in the code :

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

#SingleInstance ignore
if 0 = 0 ; if fileNanny is launched without arguments
{
if strlen(winX) = 0
  winX := (A_Screenwidth - 180) / 2 ; if winX variable doesn't exist, window is centered
if strlen(winY) = 0
winY := (A_Screenheight - 130) / 2
gosub CreateGUI
}

else ; if there are arguments
{
Loop, %0% ; for each file
{
param := %A_Index%
SplitPath param, fileName, dirName ; we retrieve the folder and file name (with extension)
StringSplit rawName, fileName, "." ; rawname is the filename without extension
dirToCreate = %dirName%\%rawName1%  ; the folder to create is named after the file
FileCreateDir %dirToCreate% ; folder is created
FileMove %param%, %dirToCreate% ; the file is moved to the new folder
}
ExitApp
}
return

CreateGUI:
  gui destroy ; we destroy previous gui
  RegRead, regTest, HKEY_CLASSES_ROOT, *\shell\FileNanny ; check if the filenanny key exist
  if strlen(regTest) = 0 ; if it doesn't exist
  {
    button1Text = Add context menu item ; we set the label of the first button...
    button1Action = addCMI ; ... and its action
  }
  else
  {
    button1Text = Remove context menu item
    button1Action = remCMI
  }
 
  sendToFolder = %UserProfile%\SendTo ; path to "Send to" folder
  ifnotExist %sendToFolder%\filenanny.lnk ; if there's no filenanny shortcut in there
  {
    button2text = Add 'Send to' shortcut ; we set the label of the first button...
    button2action = addST ; ... and ? Its action, right.
  }
  else
  {
    button2text = Remove 'Send to' shortcut
    button2action = remST
  }
 
  Gui, Font, s9 w600
  Gui, Add, Text, x20 y10 w150 h20 , FileNanny configuration
  Gui font, norm
  Gui, Add, Button, x14 y35 w150 h30 g%button1Action%, %button1Text% ; the first button, with appropriate label etc
  Gui, Add, Button, x14 y75 w150 h30 g%button2Action%, %button2Text% ; the second button...
  Gui, Add, Button, x55 y120 w70 h30 gQuit, Quit
  Gui, Show, x%winX% y%winY% h160 w180, FileNanny
return

AddCMI: ; operations to add context menu item
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, *\shell\FileNanny, , FileNann&y this ; create the first key
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, *\shell\FileNanny\command, , "%A_ScriptFullPath%" "`%L" ; and the subkey
gosub refreshGUI ; we redraw gui because buttons must be changed
return

RemCMI: ; operations to remove context menu item
RegDelete HKEY_CLASSES_ROOT, *\shell\FileNanny ; remove FileNanny registry key
gosub refreshGUI ; we redraw gui because buttons must be changed
return

addST: ; operations to add 'Send to' shortcut
FileCreateShortcut, %A_ScriptFullPath%, %sendToFolder%\filenanny.lnk ; create a shortcut to filenanny.exe
gosub refreshGUI
return

remST: ; operations to remove 'Send to' shortcut
FileDelete, %sendToFolder%\filenanny.lnk ; shortcut is deleted
gosub refreshGUI
return

refreshGUI:
winId := WinExist("FileNanny") ; we retrieve FileNanny's unique id
WinGetPos winX, winY, , , ahk_id %winId% ; we store window coordinates in winX and winY
gosub CreateGUI
return

Quit:
GuiClose:
GuiEscape:
  ExitApp
return

174
I use (a slightly modified version of) this ahk script and i'm quite happy with it.

175
Here's the update.

Just put filenanny.exe anywhere and launch it to run the configuration box. It allows you to add/remove context menu entry and/or 'Send to' shortcut.

filenanny_config.jpg

You can access the configuration box anytime by launching filenanny.exe again.

I've tested it a lot of times, it seems to be working well. Nevertheless, i'm not 100% happy with it. Indeed, the context menu method is slower than the sendto method because it loads the program for each file instead of passing all files as arguments and letting the script process the loop. If anyone has a solution, i'd be happy to read it :)

I'd also love to add the filenanny icon to the context menu entry but it seems to be quite difficult. Same here : if anyone knows how to do it, please tell me :)

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