topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday November 13, 2025, 6:07 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

Recent Posts

Pages: prev1 ... 168 169 170 171 172 [173] 174 175 176 177 178 ... 309next
4301
General Software Discussion / Re: Help with search syntax on Win7 ...
« Last post by MilesAhead on June 21, 2012, 02:42 PM »
I think you could do it in Explorer using the search. But you'd need to use a hack, like a drop target that chops off the filename part.

For example if you dropped a bunch of files like c:\temp\readme.txt  c:\tmp\readme.txt onto the target, it should copy the folders c:\temp and c:\tmp.

It's a simple matter of getting the dir part of the path and using FolderCopy or CopyFolder, whatever it's called. The proviso is the code would have to check that a folder for copying is not already in the list. But that's not that difficult.

4302
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 21, 2012, 02:10 PM »
I don´t know if AHK cares about it, but it´s good practice in programming and other languages would not accept such an implicit conversion. ;)

The "I don't know" part above is the salient phrase. Goolge COM and Variant. As for the bit about SubStr(), such sarcasm is weak.  That's all you can come up with?  Read the help for SubStr() and analyze it on here. Then maybe I'll ask when something befuddles me.

If you can analyze this run-on paragraph, I'd appreciate it

================================================================

SubStr(String, StartingPos [, Length]) [v1.0.46+]: Copies a substring from String starting at StartingPos and proceeding rightward to include at most Length characters (if Length is omitted, it defaults to "all characters"). For StartingPos, specify 1 to start at the first character, 2 to start at the second, and so on (if StartingPos is beyond String's length, an empty string is returned). If StartingPos is less than 1, it is considered to be an offset from the end of the string. For example, 0 extracts the last character and -1 extracts the two last characters (but if StartingPos tries to go beyond the left end of the string, the extraction starts at the first character). Length is the maximum number of characters to retrieve (fewer than the maximum are retrieved whenever the remaining part of the string is too short). Specify a negative Length to omit that many characters from the end of the returned string (an empty string is returned if all or too many characters are omitted). Related items: RegExMatch(), StringMid, StringLeft/Right, StringTrimLeft/Right.

================================================================


4303
Post New Requests Here / Re: Chop off extra junk in file names
« Last post by MilesAhead on June 21, 2012, 12:45 AM »
I've mentioned it before, but FreeCommander has a nice renamer. It's less complex than BRU but a lot better than Explorer.  For instance in the example given on RegexRenamer site about changing auto-generated filenames from a camera to a numbered sequence starting with MyPics or whatever it was.. in FreeCommander renamer you would just type the name as in MyPics[c]  then click on starting number and if to pad with how many zeroes etc..  Or if you want to keep the name and add to it you use [n] for name and [e] for extension in the extension part.  It cannot do things like BRU and remove letters from n'th position to n'th + 10 but it can do other things in a much simpler way.
4304
General Software Discussion / Re: Shift Kicker 1.1.1.5
« Last post by MilesAhead on June 20, 2012, 11:27 PM »
Shift Kicker 1.1.1.5 Now Shift Kicker will Maximize with a gap when you click the mouse on the Maximize Button.  Hold down the Shift key to maximize the window normally.
4305
Post New Requests Here / Re: Chop off extra junk in file names
« Last post by MilesAhead on June 20, 2012, 08:17 PM »
jgpaiva, nice find, that RegexRenamer.  Nick, if you choose to go with that application, here's a screenshot to help you along:
 (see attachment in previous post)

That does look interesting. I'm going to try it out myself.
4306
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.7
« Last post by MilesAhead on June 20, 2012, 04:41 PM »
MoveIt 1.1.8.7 Changed Middle Mouse Button hotkey so that it only fires when held on Caption Bar. This should reduce conflict with windows using it for scrolling.. such as browsers.
4307
General Software Discussion / Re: Help with search syntax on Win7 ...
« Last post by MilesAhead on June 20, 2012, 02:17 PM »
I don't use it this way often, but I believe Everything search you can start the search at a certain folder by using FolderName\searchstring

It's worth a try to see if it does enough to suit your needs as it's generally useful anyway. You can drag and drop folders/files from the results window.

For some reason the latest release only seems to be available from this forum page:
http://forum.voidtoo...c.php?f=2&t=1052

At least I haven't seen a newer release anywhere and it's the one I've been using for quite some time.

4308
General Software Discussion / Re: FolderCache 6.3.6.0
« Last post by MilesAhead on June 18, 2012, 06:25 PM »
FolderCache 6.3.6.0 Added code to add a backslash to root folders in the list. It also upcases the drive letter.  You should no longer see "c:" in the folder list. It should show "C:\" instead.
4309
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 17, 2012, 02:20 PM »
This already explains it better than I can in a few paragraphs:

http://windowsxp.mvp....org/shellnewadd.htm

If you just want an empty text file, you don't have to bother with the template.
4310
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 17, 2012, 02:18 PM »
:-*
It's difficult for me to understand this phrase :
"Template script (you can customize this template by editing "ShellNew\Template.ahk" in

your Windows folder)"

I'll try in the C:\Windows\ Folder and comment.



You have to create the folder in ShellNew if you want it's contents copied to files created under New. For example if you right click in a folder and select New AutoHotKey file, and get not and empty file but stuff like
#NoEnv
Sendmode,Input

that comes from C:\Windows\ShellNew\Template.ahk

The ahk install puts it there.
You don't need the file unless you want boiler plate text in every file created.

In my Templay.ahk file I have a whole skeleton program with hotkey, about dialog, donate command in tray menu etc...  Then I make changes.. if it's for a basic hotkey tray app.
4311
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.6
« Last post by MilesAhead on June 17, 2012, 02:13 PM »
MoveIt 1.1.8.6 Added pattern for 5 Explorer folders.
4312
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 16, 2012, 06:32 PM »
Another approach that may work a bit more reliably uses clipboard in a folder. It uses the same Send key technique for desktop.  But inside a folder, select one folder with the mouse and hit the hotkey. It should only try to create instructions.txt if the highlighted item is a folder. Since that creates the file inside the folder, I use Run to launch it. Might save opening the selected folder and hunting for the file. Since it uses FileAppend function, if the file already exists in the folder, it should open it. You can spiff up the code a bit by doing stuff like saving clipboard contents and restoring etc... This is just a working skeleton.


#SingleInstance force
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

GroupAdd,DeskGroup,ahk_class CabinetWClass
GroupAdd,DeskGroup,ahk_class ExploreWClass
GroupAdd,DeskGroup,ahk_class Progman
GroupAdd,DeskGroup,ahk_class WorkerW

#IfWinActive ahk_group DeskGroup
^+F10::
  WinGetClass,class,A
  if (class = "Progman") or (class = "WorkerW")
  {
    Send {AppsKey}wt
    Sleep,10
    Send instructions
  }
  else if (class = "CabinetWClass") Or (class = "ExploreWClass")
  {
    Clipboard=
    Send ^c
    ClipWait,2
    ff = %Clipboard%
    if (!InStr(FileExist(ff),"D"))
      SoundPlay, *16
    else
    {
      ff := ff "\instructions.txt"
      FileAppend,,%ff%
      Run,%ff%
    }
  }
  _EmptyWorkingSet()
return

_EmptyWorkingSet()
{
  return DllCall("psapi.dll\EmptyWorkingSet", "UInt", -1)
}


4313
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 16, 2012, 06:04 PM »
Miles I am enjoying every day ReOpen.
Best Regards


Thanks. Glad you like it. :)
4314
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 16, 2012, 04:03 PM »
This is what I have in AutoIt3. It suffers from the same foible that you have to make sure nothing on the desktop or in the folder is selected. (Also as I mentioned, it doesn't work in Computer and other special Shell Object folders, which may include the libraries.)


#include <WinAPI.au3>

$hotkey = "^+{F10}"
If Not HotKeySet($hotkey, "_MakeNewTextFile") Then
MsgBox(0x1010,"MakeNewTextFile",$hotkey & " could not be assigned as Hotkey")
Exit
EndIf

While 1
Sleep(100)
WEnd

Func _MakeNewTextFile()
Local $handle = _WinAPI_GetForegroundWindow()
Local $className = _WinAPI_GetClassName($handle)
If $className = "Progman" Or $className = "WorkerW" Or $className = "ExploreWClass" Or $className = "CabinetWClass" Then
Send("{AppsKey}")
Sleep(10)
Send("w")
Sleep(10)
Send("t")
Sleep(10)
Send("instructions")
EndIf
EndFunc
4315
Post New Requests Here / Re: Create an empty txt file in the active window
« Last post by MilesAhead on June 16, 2012, 03:27 PM »
If an item to create a new text file is not already in the New menu you can add it using this info:

http://windowsxp.mvp....org/shellnewadd.htm

Also you can put a file such as Template.txt in C:\Windows\ShellNew

and put that info in the registry key.  The file will copy whatever boiler plate text is in the template file.

Also you can create an ahk_group to add more window classes such as Progman and WorkerW to do the same thing with the desktop New menu.

The New menu does not open in Computer. You'll need some test to screen out situations where Computer is the "folder" currently open or where a file or folder is selected. If a folder or file is selected you don't get the New menu. You get the context menu for a folder or for that file type. (There's always a fly in said ointment.) :)



4316
Living Room / Re: Favorite Websites...What are yours?
« Last post by MilesAhead on June 16, 2012, 02:06 PM »
http://www.shuqilive.com/index2.php

Official Website, Chinese only.

I just watched an old film of her's last night. I don't think I ever watched it all the way through before. The title was For Bad Boys Only

Wow!! I didn't realize hot chicks had such bad luck.  She plays an Olympic runner who ends up in a wheel chair, a super hot hair dresser daughter of the Olympic runner who gets half her face burned off(but of course her boyfriend still loves her) and a genetic clone( well, she plays 11 of them.. the 10 rejects and the one that worked(#11) ).

Ekin Chen plays some detective who finds first loves of rich guys that regret not marrying them(can you really make a living doing that?)  Really strange stuff!! But that's the "charm" of old HK flicks. :)
4317
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.5
« Last post by MilesAhead on June 15, 2012, 10:21 PM »
MoveIt 1.1.8.5 Added a confirmation dialog for "Reload to Free Memory" command.
4318
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.4
« Last post by MilesAhead on June 15, 2012, 04:44 PM »
I just wanted to drop you a line Miles praising your dedication to new features.

Thanks. I like this explorer placement thing just because there are so many utilities that open explorer windows willy-nilly. Now I don't care. Just hit control-shift-e and they are in some sort of pattern. I learned some stuff about AHK_L that surprised me. For one thing local variables created inside a function don't just "disappear" when you leave the function like in most compiled languages.  They are still lurking around. But if you call the function again they are overwritten with new values instead of spawning more. Little tidbits are interesting. I'm used to compiled languages where the stuff is stored on the stack. Return from function and it's all gone. :)
4319
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.4
« Last post by MilesAhead on June 15, 2012, 04:08 PM »
MoveIt 1.1.8.4 Changed Tray Menu command from Purge Dead Window Info to Reload to Free Memory. Only really useful if you leave your machine running 24/7 with MoveIt running in the tray. It may free up a bit of memory in that case.
4320
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.2
« Last post by MilesAhead on June 14, 2012, 11:48 PM »
MoveIt 1.1.8.2 Hopefully Explorer Stagger function now has all memory leaks plugged.
4321
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.1
« Last post by MilesAhead on June 14, 2012, 05:46 PM »
MoveIt 1.1.8.1 Cleaned up the code that releases the list of Explorer Windows after they are placed. Just minor code changes. They shouldn't even be detectable to the user.
4322
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.0
« Last post by MilesAhead on June 14, 2012, 03:37 PM »
MoveIt 1.1.8.0 Fixed associative array memory leak in Explorer Stagger routine.
4323
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.7.0
« Last post by MilesAhead on June 13, 2012, 05:50 PM »
MoveIt 1.1.7.0 Now the Stagger function places Explorer Windows sorted by path/title.
(e.g. "Computer" is after anything beginning with "C:\" and "D:\whatever" is after those)

I think it helps to have some kind of order. Otherwise they are picked up in z-order by the AHK list function. It was whatever was closest to the top.  The same group of folders were being placed in various orders just because one happened to be on top of another in the z-order.

4324
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.6.0
« Last post by MilesAhead on June 13, 2012, 02:30 PM »
MoveIt 1.1.6.0 Changed Stagger for 3 Explorer Windows. Bottom window is now approx 2/3 work area width and 1/2 work area height, roughly centered horizontally.
4325
Post New Requests Here / Re: Sending user-supplied text
« Last post by MilesAhead on June 12, 2012, 11:43 PM »
The best thing to do is create a script that does as close to what you want as you can get, then post it in the Support forum.  Explain what you are trying to do. Plenty of AHK programmers will offer suggestions and code snippets. The traffic will be at least an order of magnitude greater than on this thread.

http://www.autohotke...ea37362128d6bb672472

Also it's good to follow these suggestions:
http://www.autohotke...c.php?f=1&t=4986

If you are trying to do something like Close All Windows and there's a CloseAllWindows function in the help index that you didn't bother too look for, you won't get much sympathy. But if you follow the suggestions many people will try to help you out there.

As for syntax, AHK is the only programming language I'm familiar with that has a string data type that's wrapped in double quotes sometimes, but just written in at other times with no quoting whatever. It drives me nuts.  I think if they ever get to AHK2 strings will be double quoted always. Also they will dump the comma syntax. It's too primitive.

The trouble is it handles context specific hotkeys in a way that AutoIt can't. So I can't ignore it even if I'd like to. :)


Pages: prev1 ... 168 169 170 171 172 [173] 174 175 176 177 178 ... 309next