| View previous topic :: View next topic |
| Author |
Message |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Sun Jul 11, 2004 3:14 pm Post subject: |
|
|
Yes, I would like the GUI feature to be easy to use, preferably avoiding the need for any external utilities or helper scripts. My philosophy is that AHK syntax should be very abstract and as simple as possible. I do not want it to be "yet another programming language" like some other scripting languages seem to be.
Obviously, there's a trade-off between simplicity and power/flexibility. To find the right balance, I want to rely on the input of you and anyone else with an interest in GUI building. |
|
| Back to top |
|
 |
silentblood
Joined: 19 Jun 2004 Posts: 36
|
Posted: Tue Jul 13, 2004 5:47 am Post subject: |
|
|
| I have read over everything. This is just beyond me. I think I am about to give up on a GUI for my scripts. |
|
| Back to top |
|
 |
PenP
Joined: 15 May 2004 Posts: 10 Location: The Netherlands
|
Posted: Tue Jul 13, 2004 8:55 pm Post subject: |
|
|
Hi,
I'm also looking for a nice and simple GUI to launch my scripts or get some data. I also tried GUI4Cli, but like Chris said I like to keep it as simple and clean as possible. At this moment I'm back where I started "HTA" thanks to Rajat. It's giving me a hard time, getting some data is not the problem but then launching some scripts to manipulate the data is very hard.
Just linking to a script will start downloading the script, so now I'm working with an INI file. As soon as the ini exist with some data (from the .HTA gui) then the looping script (witch checks if the INI exists) will launch the required script. It's still not what I want, but its working for me at the moment.
Grtz,
PenP
Nobody said "Life is easy" |
|
| Back to top |
|
 |
Atomhrt Guest
|
Posted: Sat Jul 17, 2004 7:13 pm Post subject: |
|
|
Here is a GUI4Cli that works with AHK files. You can set a "view" on hotkeys, directives, comments, menu items and sub names.
See the screenhot at: http://www.ezimagecenter.us/image.cfm?ImageID=13471
Edit: See latest version below. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Sat Jul 17, 2004 7:31 pm Post subject: |
|
|
very nice work atomhrt! real cool.
another field where GUI is shining!... somehow Chris doesn't seem keen to make a foray into this field.  _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Sat Jul 17, 2004 7:41 pm Post subject: |
|
|
| I tried it and it looks great. It also gave me a good reason to download Gui4cli sooner than I would have. Thanks. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Sat Jul 17, 2004 7:44 pm Post subject: |
|
|
| Quote: | | somehow Chris doesn't seem keen to make a foray into this field |
Hotstrings had a higher priority because it's closer to the central mission of AHK. In addition, it was suggested earlier than GUI support. |
|
| Back to top |
|
 |
Atomhrt Guest
|
Posted: Sat Jul 17, 2004 7:47 pm Post subject: |
|
|
| Rajat wrote: | very nice work atomhrt! real cool.
another field where GUI is shining!... somehow Chris doesn't seem keen to make a foray into this field.  |
Thanks Rajat and Chris...
I'm hoping that maybe someone... can make more enhancements to it. |
|
| Back to top |
|
 |
Atomhrt Guest
|
Posted: Sun Jul 18, 2004 12:29 am Post subject: |
|
|
I've already made some additions:
1 - Added Open file from menu.
2 - Added save last path used to INI for opening files.
3 - Fixed path to INI file to be consistent.
Edit: See latest version below.
 |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Sun Jul 18, 2004 7:33 pm Post subject: |
|
|
Maybe will work out for lazy bones (those who haven't made it > 20 lines of AHK code )
-----
Creates a dialog box that displays Dynamic HTML documents.
Requires Win9x, NT4+ and IE4+
Syntax:
kixwin "dialog" ["arguments"] ["options"]
Examples:
kixwin "%logonserver%\netlogon\inputbox.htm" "Enter your name:" "resizable:no;scroll:no"
kixwin "http://www.kixtart.org/helpdesk" "10" "help:no;center:yes"
kixwin "c:\docs\choose.htm" "Pick a number;1;2;3;4;5"
Source: Unknown
[KixWin.exe] |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 19, 2004 11:09 pm Post subject: |
|
|
GUI Layout Lib (GLL) Freeware
Download
Weitere Information: Finden Sie hier.
GUI Layout Lib: Ermöglicht Ihnen, Ihre Programmfenster größenveränderbar zu machen.
Die Schalter und Listen passen sich automatisch der neuen Fenstergröße an.
Kaum Einarbeitungszeit.
Bestehende Dialog können im Handumdrehen angepasst werden.
Für VC6, VC7.0 , VC7.1.
-----
Offers the possibility to resize your program windows. Switches and lists will be resized in relation to the main windows scale. Ideal for PC C++ Programmer.
-----
AutoComplete (Edit/ComboBox-Control) Freeware
Download
Eine ausführliche Beschreibung in englischer Sprache finden Sie auf CodeProject im Artikel [AutoComplete without IAutoComplete]. (An AutoCompletion control that doesn't use IAutoComplete but still retains the same look and feel.)
Autocomplete: Ermöglicht auf einfache Weise die automatische Vervollständigung von Eingaben in Ihren Programmen.
Kompletter Sourcecode/Complete Sourcecode |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 19, 2004 11:24 pm Post subject: |
|
|
MGui (MORELLO Graphic User Interface) is a cross-platform graphical user interface written in ANSI C, also providing a C++ API via a frame library. It consists of a library, including all typical GUI objects as menu, push buttons, editable fields, lists etc... and a code generation tool (MGui Designer), which allows the user to create and maintain application window layouts using the mouse.
MGui makes it possible to create applications for Windows 3.1, Windows 95/98/NT, Unix X-Window, DOS (Borland, Watcom and DJGPP) with no knowledge about the host system graphics API. You can simply use the MGui Designer code generator to create window layouts, and write your code to interact with the created Objects.
For its features, MGui is useful to everyone who wants to realize multi platform applications, with absolutely no GUI porting needs.
It's ideal for use in DOS based embedded systems in both real mode and DPMI.
The library and the associated Designer tool are FreeWare (though they are not crippled in any way):
You can use them without time limitation and you can create FreeWare applications, with no fee to the author.
Notice however: any program using this FreeWare version of MGui cannot be used for commercial or any other profit purpose.
In order to make commercial use of any program created with MGui, please contact the author to buy a commercial license.
MGui sources are NOT available for free to users.
A source license can be obtained from the author under certain limitations. Please contact the author for details on the license fee.
[more...] |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Mon Jul 19, 2004 11:52 pm Post subject: |
|
|
Interesting, thanks for the links. I've made a note of the auto-complete technique for potential future application to InputBox, GUI, and/or hotstrings.
MGui seems a little too proprietary to be immediately useful, though I might certainly get some ideas from trying out its layout editor. Thanks. |
|
| Back to top |
|
 |
Atomhrt Guest
|
Posted: Thu Jul 22, 2004 4:40 am Post subject: |
|
|
This should be the last time I post any fixes for this, but these were just too glarring to not post. Now at version 1.02.
| Code: | G4C AHKTree
// -------------------------------------------------------------
// AHK file viewer and launcher.
// Version 1.01
// Added Open file from menu.
// Added save last path used to INI for opening files.
// Fixed path to INI file to be consistent.
// Version 1.02
// Fixed displaying of hotkeys even if not checked.
// Fixed showing hotkeys with a # sign, as directives.
// This gui consist of a treeview into which you load ahk files.
// The file name is added as a root item.
// -------------------------------------------------------------
// -------------------------------------------------------------
// Notes:
// The first line of the .ahk file is always displayed and should
// be used to give a short description of the script.
//
// You can filter your view on the following:
// Hotkeys
// Menu Items
// Subroutine labels
// Directives
// Comments
//
// View Preferences are saved in :ahktree.ini (this gui's location)
//
// Supports drag and drop into the gui.
// -------------------------------------------------------------
// The gui...
// -------------------------------------------------------------
WINDOW 180 35 353 359 "AHKTree"
winattr style resize/remsize/drop
xOnLoad
// LoadFont "Courier New/9" EditTreeFont
// Load view settings from INI file
LoadIni ":ahktree.ini" PREFS
// Set check marks view items
if $covar > ""
SetAttr #this comments CHECK ON
endif
if $dirvar > ""
SetAttr #this directives CHECK ON
endif
if $meuvar > ""
SetAttr #this menuitems CHECK ON
endif
if $subvar > ""
SetAttr #this subs CHECK ON
endif
if $hkvar > ""
SetAttr #this hotkeys CHECK ON
endif
// load last path used
LoadIni ":ahktree.ini" PATHS
filename = $$this.path
guiopen #this
xonclose
SaveIni ":ahktree.ini" PREFS hkvar/covar/dirvar/subvar/meuvar
guiquit #this
// freeFont EditTreeFont
// add files dropped onto the window..
xOnDrop *
local c
if $$drop.type = FILE
update #this mytab 0
for c 0 $$drop.max
gosub #this loadfile '$$drop.$c'
endfor
endif
XTAB 0 0 353 359 'Scripts/Search' mytab
attr id mytab
attr resize 0022
// --------------------------------------------------------------
// File and Show menus.
// --------------------------------------------------------------
xMenu #root file _File NEWMENU
xMenu File Open "_Open file.."
gosub #this loadFileRequest
xMenu File dumy #separator
xMenu File quit "&Quit"
SaveIni ":ahktree.ini" PREFS hkvar/covar/dirvar/subvar/meuvar
guiquit #this
xMenu #Root view _Show NEWMENU
xMenu view hotkeys _Hotkeys CHECK/hkvar
Attr CHECK ON // set this on..
gosub #this refreshFile
xMenu view comments _Comments CHECK/covar
gosub #this refreshFile
xMenu view directives _Directives CHECK/dirvar
gosub #this refreshFile
xMenu view menuitems _MenuItems CHECK/meuvar
gosub #this refreshFile
xMenu view subs _SubRoutines CHECK/subvar
gosub #this refreshFile
// --------------------------------------------------------------------
// This is the actual treeview.
// --------------------------------------------------------------------
XTREEVIEW 5 25 343 329 '' tvar
attr frame sunk; attr resize 0022; attr id tv
attr tab mytab/0; attr icon g4c/0
// attr font EditTreeFont
ATTR STYLE DRAG/arrange/drop/noadd/track
if $$tv.level = 0 // file name - goto file
gosub #this gotoFilename
endif
// --------------------------------------------------------------------
// Search listview.
// --------------------------------------------------------------------
XGROUPBOX 5 25 343 45 "Search for:"
attr tab mytab/1; attr resize 0020
XCOMBO 10 40 270 130 searchFor
attr resize 0020; attr tab mytab/1; attr id combo1
if $searchFor > ''
gosub #this searchFiles CURRENT $searchFor
endif
XICON 290 35 25 25 std/12/s
attr style shade; attr tab mytab/1; attr resize 2000
attr help 'Search the current file only'
gosub #this searchFiles CURRENT $searchFor
XICON 315 35 25 25 std/13/s
attr style shade; attr tab mytab/1; attr resize 2000
attr help 'Search all loaded files'
gosub #this searchFiles ALL $searchFor
XTREEVIEW 5 75 343 279 '' tvar2
attr frame sunk; attr resize 0022; attr id tv2
attr tab mytab/1; attr icon g4c/0
ATTR STYLE track
if $$tv.level = 0 // file name - goto file
gosub #this gotoFilename
endif
xRoutine searchFiles which string
local file
if $string = ''; stop; endif
use combo #this combo1
combo addunique $string
use tv #this tv2
tv clear
setevent #this tv2 hide // for speed..
use tv #this tv
if $which = CURRENT // search current file only
if $$tv.valid = 0; stop; endif
if $$tv.child = 0; tv goto parent; endif
gosub #this filterLines $$tv.text $string
else
tv goto root
while $$tv.valid = 1
gosub #this filterLines $$tv.text $string
use tv #this tv
tv goto next
endwhile
endif
setevent #this tv2 show
setevent #this tv2 refresh
use tv #this tv2
tv goto root
// search one file..
xRoutine FilterLines file string
local addedHead/method
addedHead = 0 // flag
method = ''
use listview #this lv1
lv load $file
use tv #this tv2
tv goto root
// needed to avoid problems with "$" chars in the lines
set deeptrans off
lvsearch '$string' first lines
while $$lv.valid = 1
if $addedHead = 0
addedHead = 1
seticon #this tv2 20 next
tv add '$file' ROOT
method = CHILD // to create 1st child..
endif
// Found matches
gosub #this addevent 16 tv2 $method
method = ''
lvsearch '$string' next lines
endwhile
set deeptrans on // re-enable translation of var in var
lv clear
// --------------------------------------------------------------------
// Toolbar
// --------------------------------------------------------------------
xRebar tb1
xToolbar STD/0/L 7/5/13/4
Attr TOOL '7/title/Open/help/Load a ahk file/ROUTINE/loadFileRequest'
Attr TOOL '5/title/Remove/help/Remove file/ROUTINE/removeFile'
Attr TOOL '13/title/Refresh/help/Refresh listing/ROUTINE/refreshFile'
Attr TOOL '4/title/Run/help/Run Script/ROUTINE/runScr'
attr id tb1
xRoutine loadFileRequest
if $filename = ''; filename = $$this.path; endif
if $lastpath > ""; filename = $lastpath; endif
reqfile MULTI "Choose a file:" $filename filename 'AHK/*.ahk;*.gc/All files/*.*'
while $$reqfile.valid = 1
gosub #this loadfile $$reqfile.file
reqfile goto next
endwhile
// save last path used to INI file.
if $filename > ""
extract filename path lastpath
SaveIni ":ahktree.ini" PATHS lastpath
endif
xRoutine removeFile
gosub #this gotoFilename
wait abort $$tv.text #this/myWait // abort notification
tv delete
xRoutine refreshFile
gosub #this gotoFilename
gosub #this loadfile $$tv.text
tv expand // tv is at the filename - expand the branch..
xRoutine runScr
local scrname
gosub #this gotoFilename
tv goto child
scrname = $$tv.text
cutvar scrname cut word 1
cutvar scrname cut word 1
extract scrname clean
ifexists gui $scrname
guirename $scrname DUMMY_GUI
guiquit DUMMY_GUI
endif
tv goto parent
//scrload $$tv.text
Run $$tv.text
xRoutine gotoFileName
use tv #this tv
if $$tv.valid = 0
stop // stop if there is no valid filename
elseif $$tv.level = 1
tv goto parent
endif
// --------------------------------------------------------------------
// Load a file into the treeview
// --------------------------------------------------------------------
XLISTVIEW 0 0 250 356 '' '' lvar1
attr show hide
attr id lv1
xRoutine loadFile name
local v/com/ix
// remove all files with the same name..
gosub #this initFile $name
ix = $$tv.index // store filename position..
// get header..
use lv #this lv1
lv load $name
lv go top
wait notify '$name' 0 #this/myWait // start change notification..
seticon #this tv 16 next
// First line in file
tv add '1 $$lv.text' CHILD // G4C top line..
lv go next
set deeptrans off
while $$lv.valid = 1
v = $$lv.text
set translation off
cutvar v copy word 1 com
set translation on
extract com clean
// Menu, items
if $com = MENU\,
AND $meuvar > ""
gosub #this addevent 1 tv ''
endif
// Comments
SearchVar com ";" first
if $$search.pos > ""
AND $covar > ""
gosub #this addevent 14 tv ''
endif
// Check for subs or hotkey items
SearchVar com "::" first
mhk = $$search.pos
SearchVar com[-1][1] ":" first
msub = $$search.pos
if $mhk > ""
AND $msub > ""
AND $hkvar > ""
gosub #this addevent 15 tv ''
elseif $mhk = ""
AND $msub > ""
AND $subvar > ""
gosub #this addevent 18 tv ''
endif
// Directives
SearchVar com "#" first
if $$search.pos > ""
AND $dirvar > ""
AND $mhk = ""
AND $msub =""
gosub #this addevent 14 tv ''
endif
lv go next
endwhile
set deeptrans on
lv clear
tv index $ix // goto filename
tv EXPAND
// ----------------------------------------------
// add the event line
xRoutine addEvent icon tvid method // method can be CHILD or ''
local v/c/len/line
seticon #this $tvid $icon next
v = $$lv.text
set translation off
extract v clean
set translation on
extract v length len
for c 0 $len // remove tabs..
if $v[$c][1] = '\t' ; v[$c][1] = ' ' ; endif
endfor
line = $$lv.line // do one steps because deeptrans is off
++line
tv add '$line $v' $method
// ----------------------------------------------
// initialize file entry..
// if it exists, refresh, if new, add it.
xRoutine initFile name
use tv #this tv
tv goto root
while $$tv.valid = 1
if $$tv.text = $name
wait abort $$tv.text #this/myWait // abort notification
tv empty // empty contents of this item..
return // finished..
endif
tv goto next
endwhile
// if none found, add a new one..
seticon #this tv 20 next
tv add '$name' ROOT // add the file name
// --------------------------------------------------------------------
// File change waiting - watch all loaded files..
// --------------------------------------------------------------------
xWait myWait
if $$wait.success = 1 // some file changed - refresh it..
delay 200 // wait a bit till system finishes saving the file..
gosub #this loadFile '$$wait.name'
tv expand // tv is at the filename - expand the branch..
else
msgbox 'Wait on file $$wait.file\nSuccess = $$wait.success' OK
endif
|
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Thu Jul 22, 2004 11:34 am Post subject: |
|
|
| Looks good. I edited your earlier posts to point to the latest version above (since the forum doesn't allow guests to edit their own posts). |
|
| Back to top |
|
 |
|