topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 12:44 pm
  • 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 ... 9next
26
Living Room / Re: The Greatest Graphic Novel of All Time: Watchmen
« on: March 04, 2009, 08:21 PM »
To anybody inclined to read stuff different from classic superheroes comic books, i strongly recommand the work from those guys :

- Daniel Clowes


- Robert Crumb
http://i251.photobucket.com/albums/gg305/sandydsf/RobertCrumb.jpg


- Peter Bagge


- Dave Cooper

27
The absence of AHK under Linux is possibly the only reason that prevented me to switch to Ubuntu permanently.

In addition a more active development cycle is planned with features such as:

    * Arrays, 128bit math and Unicode
    * Data mining functions - XML, JSON, SQLite and MySQL
Nice ! :-*

28
Thanks guys :) Don't hesitate to warn me if you see any grammar or syntax error.

Thebigguy> i'll have a look at it but i can't promise anything.

29
does anyone else agree that ak_ needs a DC web space to showcase all his wonderful scripts? i wanted to introduce FileNanny to a colleague and had to do some navigation to find the latest version. :)
I'm happy to announce that my dcmembers website is up and running :) It is not quite finished yet but the essential is there and you can use it to download the scripts etc. Thanks again to Mouser and Gothi[c] for the web space, the time and everything else.

30
cyberkilla> actually, just when i thought the hardest part was done, i just found myself facing a stupid bug that drives me crazy. When i minimize all windows, i keep their "unique id number" in a variable so i can call them back later. The stupid thing is : some windows, when minimized, are not detected anymore, so calling their id number does nothing.

I actually ran into this problem with Pspad only, so i can still post the latest version here, it should work with most windows (if not all).

cranioscopical> i'll add a "hangover mode" to the todo list :D

32
I used iRotate some time ago and i think i faced the same problem. The solution i found was to create two autohotkey shortcut running the appropriate iRotate command-line, as the program accepts parameters.

33
Oh, i think that is Autohotkey's version number :)

34
Yes, i agree with you.

35
I'm a little confused here. What are you referring to when you say "version 1.0.47.6" ? Because i started version numbering two releases ago so i never (intentionally) released a 1.0.47.6 version :D

36
Hi GimmeAreason. I'm glad you like FileNanny.

About this "refresh" thing, it really bugs me because i really don't see how changing my code could affect the way explorer displays newly created folders. I just don't get it :tellme: Are you sure this refresh thing only happens with the last versions ?

I'd love to have a look at the problem but i don't know how since i can't recreate the bug (it works fine on my computer, even if i'm using explorer).

37
Videoinpicture> thanks a lot for trying it :)

cyberkilla> i'm glad you posted this message, it motivates me to finish this thing :)

Since you're here, let me ask you a question : when the windows have been minimized, when should Dumdum "forget" about those windows ? I mean, if i shake a window, then restore a few by hand, close some others, work for 3 hours and then shake the same window again, i suppose it should minimize every other windows (instead of restoring the ones that have been minimized earlier). I hope i'm clear :)

38
Weird/stupid ? :D

Actually, i understand how this "Aero shake" feature might not seem very useful. Personally, i don't think i'm gonna be using it anytime soon. However, i thought the idea was fun and thought it might be an interesting ahk project. That's why i'd really appreciate if anyone took a few minutes to try it and tell me if it works fine or not :) Again, i understand if the program itself doesn't look appealing to you because it is not to me (but it is as a project).

Thanks :)

39
I guess all you need to do is make sure the user can't choose the same hotkey for both operations. Sorry if it's too much to ask.

40
Personnally, i'd really prefer middle button, because i like to use Circle Dock as a "mouse only launcher", for example when i'm in the back of my chair with the keyboard out of reach :) Maybe letting the user choose the hotkey would be the best solution.

41
Ok, i found the solution to my problem and thought it might be useful to others so here it is.

I noticed that the problematic programs used tabs (Freecommander does, PSPad too) and realized that ahk detected the active tab as a window. So, i took a look at those tabs' window style and noticed that they had this one in common : WS_POPUP - 0x80000000. I added a condition to exclude windows containing this particular style and the problem is now solved :)

Of course now i'm facing another problem but i'm glad to be moving forward :)

Now, let me tell you about this script i'm working on. Its temporary name is Dumdum (don't ask why, i have no idea) and its purpose is to mimic the Aero Shake feature of Windows 7. You can try it, but first you have to know that it is a very early version. Right now, if you shake a window, it will minimize all others, but if you shake it again they won't come back (it is, of course, in the todo list). Another problem : sometimes, you shake a window and after the other windows have been minimized, the active window is not "dragged" anymore and goes back to its original place. It's hard to explain but i think you'll figure it out if you try. I couldn't find the origin of this bug yet.

Here it is :

In the future, the user will be able to choose the "shaking sensitivity" and the windows behaviour (minimize other windows, minimize active window, close active window etc).

42
I already did :) But i have another idea, i'll try it later. Thanks for your help, both of you.

43
Justice :

I tried to WinMinimizeAll and then to bring the active window back, but it makes the window disappear for a moment, plus WinMinimizeAll doesn't work for people using Emerge shell (like myself).
-ak_

:)

44
After checking the list of the windows retrieved by the WinGet command, i think the problem comes from the fact that WinGet detects child windows, or inner-windows or whatever it is. I found out that every program causing a problem appeared in the list twice, sometimes with two different titles.

45
Coding Snacks / ETC : Emerge Tasks Companion
« on: November 09, 2008, 03:48 PM »
I've been trying Emerge for quite some time now and i happen to enjoy it. However, a feature (provided by 3rd party software Taskbar Shuffle) i missed really badly was to be able to close programs by middle-clicking their button in the taskbar. So i created this little script to enable this feature with emerge.

ETC :

It works very well on my system, but as Emerge Tasks and Emerge Tray have the same class name, i recommand you don't middle-click on your system tray to avoid unwanted events (nothing bad though).

46
Ah, false joy : i ran MinimOther and the same problem happens with the same windows...

47
jgpaiva> wow you're like the fastest poster ever :D Anyway, thanks for the info, i'll have a look at Skrommel's method. Actually, the minimizing thing is just a part of my script (i've done the first part already, more or less).

48
(sorry if i'm posting this in the wrong section)

I'm working on a new ahk script and i'm pretty happy with what i've done so far. However, i'm facing a problem and as i didn't get much help from the autohotkey forum, i thought i'd ask my donationcoder buddies :)

Problem :

I'm trying to minimize all windows except the active one, using the following piece of code :
Winget, activeId, id, A
Winget, winlist, list
loop %winlist%
{
  winid := winlist%A_Index%
  Wingettitle, wintitle, ahk_id %winid%
 
  if (strlen(wintitle) != 0 and winid != activeId and wintitle != "Program Manager")
  {
    PostMessage, 0x112, 0xF020,,, ahk_id %winid%
  }
}

The problem with this method is that it works well with some windows (they stay visible while the other ones get minimized) but it doesn't work with others (ie Freecommander, Pspad), who get minimized anyway. I tried to modify the code to minimize the active window only, and it worked fine except with the program mentionned earlier.

Anyway, my goal is to minimize all windows except the active one, and i'm out of ideas. I tried to WinMinimizeAll and then to bring the active window back, but it makes the window disappear for a moment, plus WinMinimizeAll doesn't work for people using Emerge shell (like myself). Sending #d or #m doesn't work for the same reasons.

If anyone has any idea, i'd be really glad to hear it :)

Thanks.

49
nogojoe> i assume you use Windows Explorer ? I guess i could send a "F5" to the active window if this window is Explorer, but i don't really like the idea. The main reason is that the problem doesn't come from my code but from the fact that, obvisouly, the file explorer you use doesn't automatically refresh.

50
Here is FileNanny 1.4 :

Changelog :
- Added the Autoarchive feature to automatically move newly created folders to an archive folder.

Source code :

;; 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
{
gosub iniVar
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

;; Autoarchive
Loop, parse, dirToCreate, \,
  folderName = %A_LoopField%

if (autoarchive = 1)
  FileMoveDir %dirToCreate%, %archivedir%\%folderName%, 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|Autoarchive
  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, Tab, AutoArchive
  Gui, Add, CheckBox, x16 y35 w300 h30 vAutoArchive gini, Automatically move newly created folders to this folder :
  Gui, Add, Edit, x16 y65 w170 h20 vArchiveDir,
  Gui, Add, Button, x190 y63 w70 h26 gBrowse, Browse
  Gui, Show, autosize, FileNanny
return

iniVar:
Iniread shiftKey, %iniFile%, options, shiftKey
Iniread similar, %iniFile%, options, similarfiles
Iniread autoarchive, %iniFile%, autoarchive, enabled
Iniread archivedir, %iniFile%, autoarchive, archivedir
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
Iniwrite %AutoArchive%, %iniFile%, autoarchive, enabled
Iniwrite %archivedir%, %inifile%, autoarchive, archivedir
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
Iniread AutoArchive, %iniFile%, autoarchive, enabled
Iniread archivedir, %iniFile%, autoarchive, archivedir
Guicontrol ,,shiftKey, %shiftKey%
Guicontrol ,,convDot, %convDot%
Guicontrol ,,convMinus, %convMinus%
Guicontrol ,,convUnderscore, %convUnderscore%
Guicontrol ,,convPercent, %convPercent%
Guicontrol ,,similar, %similar%
Guicontrol ,,AutoArchive, %AutoArchive%
Guicontrol ,,archivedir, %archivedir%
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

Browse:
FileSelectFolder, ArchiveFolder, 3
GuiControl,, ArchiveDir, %ArchiveFolder%
Gosub ini
return

Quit:
GuiClose:
GuiEscape:
  ExitApp
return

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