Thanks for your help! In the end I just used the Windows clipboard. I've been writing a mini-CMS program for a client who just wants to update the News page of her website every few days without having to learn HTML. She can type her content in Word or Notepad, copy it to the clipboard and then run my GLPro "UPLOADER.EXE", which adds in a CSS link, swaps CRLFs for <br> tags, FTPs the data to her webspace and saves it there as an HTML file. The updated text is presented as an IFrame on her News page. Simple, and it works...
Simon ----- Original Message ----- From: "Dick Trump" <[EMAIL PROTECTED]> To: "Simon Beck" <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Friday, July 28, 2006 9:32 PM Subject: Re: Input/Windows controls for GLPro 8 > Simon wrote: >> ...actually I think it may be CONTROLS.TXT, not .GLS. > > Here are two different ones. I'm not sure which one you were thinking of > but now you have two. > > HTH > -- > Dick > [EMAIL PROTECTED] > > > -------------------------------------------------------------------------------- > ;do not run this script directly. > exit > > ;-------------------------------------------------------------------- > DECLARATIONS > WIN_TEXTBOX: declare name GOSUB x1 y1 x2 y2 text flags id visible password > set flags @[EMAIL PROTECTED] > global @name 0 > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > if def(password)=="1" > if @password=="1" > set flags @flags+32 > endif > endif > set id @id+2000 > set @name > CreateWindow("Edit",@text,@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_LISTBOX: declare name GOSUB x1 y1 x2 y2 flags id visible > set flags @flags|@WS_CHILD > if def(visible)=="1" > if @visible<>"1" > set flags @flags|@WS_VISIBLE > endif > else > set flags @flags|@WS_VISIBLE > endif > global @name 0 > set id @id+2000 > set @name > CreateWindow("ListBox","",@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_DROPDOWNLIST: declare name GOSUB x1 y1 x2 y2 flags id visible > set flags @[EMAIL PROTECTED] > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > global @name 0 > set id @id+2000 > set @name > CreateWindow("ComboBox","",@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_CHECKBOX: declare name GOSUB x1 y1 x2 y2 txt flags id visible > global @name 0 > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > set flags @[EMAIL PROTECTED] > set id @id+2000 > set @name > CreateWindow("Button",@txt,@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_RADIO: declare name GOSUB x1 y1 x2 y2 txt flags id visible > global @name 0 > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > set flags @[EMAIL PROTECTED] > set id @id+2000 > set @name > CreateWindow("Button",@txt,@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_BUTTON: declare name GOSUB x1 y1 x2 y2 txt flags id visible > global @name 0 > set flags @[EMAIL PROTECTED] > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > set id @id+2000 > set @name > CreateWindow("Button",@txt,@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > WIN_SCROLLBAR: declare name GOSUB x1 y1 x2 y2 flags id visible > global @name 0 > set flags @[EMAIL PROTECTED] > if def(visible)=="1" > if @visible<>"1" > set flags @[EMAIL PROTECTED] > endif > else > set flags @[EMAIL PROTECTED] > endif > set id @id+2000 > set @name > CreateWindow("ScrollBar","",@flags,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@winhandle,@id,@wininstance,@NULL) > ;gosub set as a jump to be made on click event > RETURN > > ;---------------------------------------------------------------------------- > COMMANDS GENERAL > > HIDE: declare name > ShowWindow(@(@name),0) > RETURN > > SHOW: declare name > ShowWindow(@(@name),5) > RETURN > > SETTEXT: declare name text > SetWindowText @@name @text > RETURN > > ADDTEXT: declare name text > set txt > gettext @name > set result @0 > SetWindowText @(@name) @[EMAIL PROTECTED] > RETURN > > GETTEXT: declare name > alloc buf 1500 > GetWindowText @(@name) @@buf 1500 > set txt @@buf$chr(0) > RETURN @txt > > ;GREAT IF C_MOVE could be called MOVE/POSITION > C_MOVE: declare name x1 y1 x2 y2 > local flag 0x004+0x010 > if !(def(x2)&&def(y2)) > set flag @flag+0x001 > set x2 0 > set y2 0 > endif > SetWindowPos(@(@name),@winhandle,@x1,@y1,@[EMAIL PROTECTED],@[EMAIL > PROTECTED],@flag) > RETURN > > ISENABLED: declare name > setupdll bool IsWindowEnabled Handle > local result 0 > set result IsWindowEnabled(@(@name)) > RETURN > > ENABLE: declare name > EnableWindow(@(@name),1) > RETURN > > DISABLE: declare name > EnableWindow(@(@name),0) > RETURN > > SETFOCUS: declare name > if def(name) > SetFocus(@(@name)) > else > SetFocus(@WinHandle) > endif > RETURN > > ;Great if destroy could be FREE but must DESTROY window and FREE CLICK > EVENT if declared > DESTROY: declare name > DestroyWindow @@name > Free @name > RETURN > ;---------------------------------------------------------------------------- > COMMANDS TEXT BOXES > > LIMITTEXT: declare name length > sendmessage(@(@name),0x400+21,@length,0) > RETURN > > SETREADONLY: declare name val > sendmessage(@(@name),0x400+31,@val,0) > RETURN > > SETPASSWORDCHAR: declare name char > if def(char) > if len(@char)>1 > set char left(@char,1) > endif > else > set char "*" > endif > sendmessage(@(@name),0x400+28,asc(@char),0) > RETURN > > GETSELECTED: declare name > local x 0 > local up 0 > local low 0 > set x sendmessage(@(@name),0x400,0,0) > set up ABS("0x"$left(right(hex(@x),8),4))+1 > set low ABS("0x"$right(right(hex(@x),8),4))+1 > GETTEXT @name > local txt @0 > if (@low<>0)&&(@up<>@low) > set txt mid(@txt,@low,@[EMAIL PROTECTED]) > else > set txt "" > endif > RETURN @txt > > GETSELECTEDLEN: declare name > local len 0 > local x 0 > local up 0 > local low 0 > set x sendmessage(@(@name),0x400,0,0) > set up ABS("0x"$left(right(hex(@x),8),4))+1 > set low ABS("0x"$right(right(hex(@x),8),4))+1 > set len @[EMAIL PROTECTED] > RETURN @len > > REPLACESELECTED: declare name text > set x sendmessage(@(@name),0x400+18,0,@text) > RETURN > > ;----------------------------------------------------------------- > COMMANDS CHECKBOXES > > GETCHECK: declare name > set x sendmessage(@(@name),0x400,0,0) > RETURN > > SETCHECK: declare name value > set x sendmessage(@(@name),0x400+1,@value,0) > RETURN > > > ;---------------------------------------------------------------------------- > COMMANDS LISTBOX > > GETCLASS: declare name > local class "" > setupdll getclassname handle fs int > alloc buf 255 > getclassname(@(@name),@@buf,255) > set class @@buf > return @class > > ADDITEM: declare name string pos > listcount @name > local num @0 > getclass @name > if @0=="ComboBox" > local id 10 > else if @0=="ListBox" > local id 2 > endif > if def(pos) > if @pos>(@num-1) > set pos -1 > endif > else > local pos -1 > endif > SendMessage(@(@name),[EMAIL PROTECTED],@pos,@string) > RETURN > > DELETEITEM: declare name pos > getclass @name > if @0=="ComboBox" > local id 4 > else if @0=="ListBox" > local id 3 > endif > SendMessage(@(@name),[EMAIL PROTECTED],@pos,"") > RETURN > > LISTCOUNT: declare name > local count 0 > getclass @name > if @0=="ComboBox" > set id 6 > else if @0=="ListBox" > set id 12 > endif > set count SendMessage(@(@name),[EMAIL PROTECTED],0,0) > RETURN @count > > CLEARLIST: declare name > getclass @name > if @0=="ComboBox" > set id 11 > else if @0=="ListBox" > set id 5 > endif > set count SendMessage(@(@name),[EMAIL PROTECTED],0,0) > RETURN > > SETINDEX: declare name pos > getclass @name > if @0=="ComboBox" > set id 14 > else if @0=="ListBox" > set id 7 > endif > > SendMessage(@(@name),[EMAIL PROTECTED],@pos,0) > RETURN > > SETINDEXMULTI: declare name pos add > ;-----------------------DEVELOPMENT NOT WORKING > if !def(add) > local add 1 > else > if @add==1 > set add 0 > else > set add 1 > endif > endif > set id 6 > set x SendMessage(@(@name),[EMAIL PROTECTED],1,0) > RETURN > > GETINDEX: declare name > local id 0 > getclass @name > if @0=="ComboBox" > set id 7 > else if @0=="ListBox" > set id 9 > endif > set id SendMessage(@(@name),[EMAIL PROTECTED],0,0) > RETURN @id > > ISINDEX: declare name pos > local id 0 > getclass @name > if @0=="ListBox" > set id 8 > else > RETURN > endif > set id SendMessage(@(@name),[EMAIL PROTECTED],@pos,0) > RETURN @id > > DROPBOX: declare name drop > if !def(drop) > IsDropBoxDown @name > if @0==0 > set drop 1 > else > set drop 0 > endif > endif > SendMessage(@(@name),0x400+15,@drop,0) > RETURN > > ISDROPBOXDOWN: declare name > local x 0 > set x SendMessage(@(@name),0x400+23,0,0) > RETURN @x > > LISTDIR: declare name > local x 0 > set x SendMessage(@(@name),0x400+14,0x4000+0x020,"*.txt") > RETURN > ;----------------------------------------------------------------------------------------- > > COMMANDS SCROLL BARS > > SETSCROLLRANGE: declare name val1 val2 > setupdll void SetScrollRange handle int int int bool > if !def(val2) > local val2 @val1 > set val1 0 > endif > SetScrollRange(@(@name),2,@val1,@val2,1) > RETURN > > SETSCROLLPOS: declare name pos > setupdll void SetScrollPos handle int int bool > set x SetScrollPos(@(@name),2,@pos,1) > RETURN > > GETSCROLLPOS: declare name > setupdll int GetScrollPos handle int > set x GetScrollPos(@(@name),2) > RETURN @x > > ENABLESCROLL: declare name but1 but2 > setupdll bool EnableScrollBar handle int uint > local id 0 > if !def(but1) > local but1 1 > endif > if !def(but2) > local but2 1 > endif > if @but1==1&&@but2==1 > set id 0x000 > endif > if @but1==1&&@but2==0 > EnableScrollBar @(@name) 2 0 > set id 0x001 > endif > if @but1==0&&@but2==1 > EnableScrollBar @(@name) 2 0 > set id 0x002 > endif > if @but1==0&&@but2==0 > set id 0x003 > endif > EnableScrollBar @(@name) 2 @id > RETURN > > -------------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 25-Jul-06 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "aftergrasp" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/aftergrasp -~----------~----~----~----~------~----~------~--~---
