AutoHotkey Community

It is currently May 26th, 2012, 12:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: December 17th, 2008, 6:32 am 
I was about to start writing a script for this, but just wanted to check if anyone has done it already maybe. I tried the search function but to no avail. Basically what I'm aiming for is EXACTLY the functionality of the filename textbox in open/save dialogs. That is, as you type a path, a listbox shows up underneath the textbox showing you different files and directories that match what has already been typed.

Has anyone already done this?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2008, 6:44 am 
Offline

Joined: December 14th, 2008, 1:18 am
Posts: 42
That sounds pretty difficult....but then again I'm a wimp.

You'd probably need to have some kind of .txt file to read off of...one that contains a list of all your common files. You could probably even find a program to make that .txt file for you. Then you could get autohotkey to read from it, and somehow get it to autocomplete for you.....

Sorry I can't do more than state the obvious :-)

If you come up with anything good, I want to see it. That sounds really useful.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2008, 3:02 pm 
Very well, I shall get to it then!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2008, 12:09 am 
Search for 320MPH.

If you've made any progress, let me know. I'd like to make a program like this.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2008, 12:41 am 
Help wrote:
ListBox Options:
Sort: Automatically sorts the contents of the list alphabetically (this also affects any items added later via GuiControl). The Sort option also enables incremental searching, which allows an item to be selected by typing the first few characters of its name.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2008, 2:14 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Code:
Gui, Add, Combobox, x7 y7 w550 h21 Choose1 hwndhSHAC vtFolder, %tFolder%
ControlGet, hMyEdit, hWnd,, Edit1, ahk_id %hSHAC%
DllCall( "ole32\CoInitialize", UInt,0 )
DllCall( "shlwapi\SHAutoComplete", UInt,hMyEdit, UInt,0x1|0x10000000 )
Gui, Add, Button, x+5 w30 hp +Default gExecute, Go
Gui, Show, h130, ShAutoComplete
Return

Execute:
 ControlGetText,cmdLine,, ahk_id %hSHAC%
 Run, %CmdLine%
Return

; Above code taken from IconEx-v1.00: www.autohotkey.com/forum/topic31670.html
; Originally, Sean posted at : www.autohotkey.com/forum/viewtopic.php?p=121621#121621

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 19th, 2008, 8:18 pm 
Thank you SKAN!
I was fooling around with other programs and noticed that this feature was too common and similar for it to be an internal code thing. So then I realized there's probably an API function somewhere that takes care of it. As soon as I found it on msdn, I came here and searched for it, and your reply came up!
Thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 10:01 am 
Offline

Joined: March 27th, 2008, 7:46 pm
Posts: 129
Location: France
:D Hello, it's very good.
:?: Nobody knows to make that with like entry a file?

_________________
with ahk, all is different!...<img>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 3:57 pm 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
soggos, you could add the something like following

Code:
tFolder := "http://www.autohotkey.com/forum"

at the top of the example script posted above


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 8:36 pm 
Offline

Joined: March 27th, 2008, 7:46 pm
Posts: 129
Location: France
hello mister SKAN,
i don't understand...
so, with tfolder:= c:\mydir >it's good for me(good retrive files or folder)
but with http, i dont understand.....
simply:
i have a file .txt with many commands , and like notepad++, i just want to retrieve found terms begin like tfolder, you see?

_________________
with ahk, all is different!...<img>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 9:48 pm 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
soggos wrote:
i have a file .txt with many commands , and like notepad++, i just want to retrieve found terms begin like tfolder, you see?


I am not sure of your requirement.. Can you post a small sample of your .txt file ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2009, 7:03 am 
Offline

Joined: March 27th, 2008, 7:46 pm
Posts: 129
Location: France
SKAN
Quote:
I am not sure of your requirement.. Can you post a small sample of your .txt file ?

OhO, it's a file like Commands.txt or Variables.txt,::>
Code:
ExitApp [, ExitCode]
FileAppend [, Text, Filename]
FileCopy, Source, Dest [, Flag (1 = overwrite)]
FileCopyDir, Source, Dest [, Flag]
FileCreateDir, Path
FileCreateShortcut, Target, C:\My Shortcut.lnk [, WorkingDir, Args, Description, IconFile, ShortcutKey, IconNumber, RunState]
FileDelete, FilePattern
FileGetAttrib, OutputVar(RASHNDOCT) [, Filename]
FileGetShortcut, LinkFile [, OutTarget, OutDir, OutArgs, OutDescription, OutIcon, OutIconNum, OutRunState]
FileGetSize, OutputVar [, Filename, Units]
FileGetTime, OutputVar [, Filename, WhichTime (M, C, or A -- default is M)]
FileGetVersion, OutputVar [, Filename]
FileInstall, Source, Dest [, Flag (1 = overwrite)]
FileMove, Source, Dest [, Flag (1 = overwrite)]
FileMoveDir, Source, Dest [, Flag (2 = overwrite)]
FileRead, OutputVar, Filename
FileReadLine, OutputVar, Filename, LineNum
FileRecycle, FilePattern
FileRecycleEmpty [, C:\]
FileRemoveDir, Path [, Recurse? (1 = yes)]
FileSelectFile, OutputVar [, Options, RootDir[\DefaultFilename], Prompt, Filter]
FileSelectFolder, OutputVar [, *StartingFolder, Options, Prompt]
FileSetAttrib, Attributes(+-^RASHNOT) [, FilePattern, OperateOnFolders?, Recurse?]
FileSetTime [, YYYYMMDDHH24MISS, FilePattern, WhichTime (M|C|A), OperateOnFolders?, Recurse?]
FormatTime, OutputVar [, YYYYMMDDHH24MISS, Format]
GetKeyState, OutputVar, WhichKey [, Mode (P|T)]
Gosub, Label
Goto, Label
GroupActivate, GroupName [, R]
GroupAdd, GroupName, WinTitle [, WinText, Label, ExcludeTitle, ExcludeText]
GroupClose, GroupName [, A|R]
GroupDeactivate, GroupName [, R]
Gui, sub-command [, Param2, Param3, Param4]
GuiControl, Sub-command, ControlID [, Param3]
GuiControlGet, OutputVar [, Sub-command, ControlID, Param4]
Hotkey, KeyName [, Label, Options]
If (var = "Value") | IfWinExist, WinTitle | etc.`n{`n   command1`n   command2`n}`nElse`n{`n   command1`n   command2`n}
If Var [not] between Low and High
If Var [not] contains value1,value2,...
If Var [not] in value1,value2,...
If Var is [not] integer|float|number|digit|xdigit|alpha|upper|lower|alnum|space|time
IfEqual, var, value
IfExist, File|Dir|Pattern
IfGreater, var, value
IfGreaterOrEqual, var, value
IfInString, Var, SearchString
IfLess, var, value
IfLessOrEqual, var, value
IfMsgBox, Yes|No|OK|Cancel|Abort|Ignore|Retry|Timeout
IfNotEqual, var, value
IfNotExist, File|Dir|Pattern
IfNotInString, Var, SearchString
IfWinActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
IniDelete, Filename, Section [, Key]
IniRead, OutputVar, Filename, Section, Key [, Default]
IniWrite, Value, Filename, Section, Key
Input [, OutputVar, Options, EndKeys, MatchList]
InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
KeyHistory
KeyWait, KeyName [, Options]
ListHotkeys
ListLines
ListVars
Loop [, Count]`n{`n   ID := A_Index`n   If var%A_Index% =`n   break`n}
Loop, FilePattern [, IncludeFolders?, Recurse?]`n{`n   FileName := A_LoopFileName`n   FileFullPath := A_LoopFileLongPath`n   FileRelativeDir := A_LoopFileDir`n   command2`n}
Loop, Parse, InputVar [, Delimiters|CSV, OmitChars]`n{`n   Line := A_LoopField`n   command2`n}
Loop, Read, InputFile [, OutputFile]`n{`n   Line := A_LoopReadLine`n   command2`n}
Loop, HKLM|HKU|HKCU|HKCR|HKCC [, Key, IncludeSubkeys?, Recurse?]`n{`n   RegName := A_LoopRegName`n   RegType := A_LoopRegType`n   command2`n}
Menu, MenuName, Cmd [, P3, P4, P5]
MouseClick, WhichButton [, X, Y, ClickCount, Speed, D|U, R]
MouseClickDrag, WhichButton, X1, Y1, X2, Y2 [, Speed, R]
MouseGetPos [, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]
MouseMove, X, Y [, Speed, R]
MsgBox [, Options, Title, Text, Timeout]
OnExit [, Label]
OutputDebug, Text
Pause [, On|Off|Toggle, OperateOnUnderlyingThread?]
PixelGetColor, OutputVar, X, Y [, Alt|Slow|RGB]
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB]
PostMessage, Msg [, wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Process, Cmd, PID-or-Name [, Param3]
Progress, Param1 [, SubText, MainText, WinTitle, FontName]
Random, OutputVar [, Min, Max]
RegDelete, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName]
RegRead, OutputVar, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName]
RegWrite, REG_SZ|REG_EXPAND_SZ|REG_MULTI_SZ|REG_DWORD|REG_BINARY, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName, Value]
Reload
Repeat
Return [, Expression]
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
RunAs [, User, Password, Domain]
RunWait, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
Send, Keys
SendEvent, Keys
SendInput, Keys

A solution/exemple with ListView: (but in ListView, not retrieve in the combobox)
Code:
 
 Gui, Add, ComboBox, vtFolder gAFFi
 Gui Add, ListView, xm vMyListView , Cmd|N°L
gui, show
return

AFFi:
FileRead, FileList , commands.txt
guicontrolget, tFolder
LV_Delete()

loop , Parse, FileList, `n
    {
    LR = %A_LoopReadLine%
       IfInString, LR, %tFolder%
          {   
             LV_Add("",A_Index, LR )
          }
    }
return


_________________
with ahk, all is different!...<img>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 1:05 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Code:
SplitPath, A_AhkPath,, A_AhkDir
FileRead, Commands, %A_AhkDir%\Extras\Editors\Syntax\Commands.txt
StringReplace, Commands, Commands, |, \, All
StringReplace, Commands, Commands, `r, , All
StringReplace, Commands, Commands, `n,| , All
Gui, Add, ComboBox, w640 R25 Simple AltSubmit vSelected, %commands%
Gui, Show,, %A_AhkDir%\Extras\Editors\Syntax\Commands.txt


:roll: :?:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 1:40 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
This is what I'm using. 100% AHK made.

Image

Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 9:59 am 
Offline

Joined: March 27th, 2008, 7:46 pm
Posts: 129
Location: France
SKAN wrote:
Code:
SplitPath, A_AhkPath,, A_AhkDir
FileRead, Commands, %A_AhkDir%\Extras\Editors\Syntax\Commands.txt
StringReplace, Commands, Commands, |, \, All
StringReplace, Commands, Commands, `r, , All
StringReplace, Commands, Commands, `n,| , All
Gui, Add, ComboBox, w640 R25 Simple AltSubmit vSelected, %commands%
Gui, Show,, %A_AhkDir%\Extras\Editors\Syntax\Commands.txt

:)h yes..it's good...
....i Just want add a hotkey for retrieve the selected line...like
Code:
enter::
guiControlGet, Selected
clipboard := Selected
Return

:?: _> but it's retrieve the number of the line, not the Line!

_________________
with ahk, all is different!...<img>


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Cerberus, patgenn123, SKAN, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group