View previous topic :: View next topic |
Author |
Message |
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Jun 21, 2003 8:49 pm Post subject: Autocompletable Editboxes |
|
|
Hello all,
I've made a .DSU unit file which gives VDS 5 the ability to transform 'normal' edit boxes into advanced auto complete edit boxes. You only have to make a list will all items which has to be suggested in it. The suggestions will be shown as selected text, so if people press another button, VDS will search for other suggestions.
You can download the latest version here.
If anybody has any questions, or wants to see the source code, please reply. _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 21, 2003 9:22 pm Post subject: |
|
|
Looks very good! I would be interested in seeing the source. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Jun 21, 2003 9:27 pm Post subject: |
|
|
It's pretty simple. Please aware that there aren't any REM lines in it... The first 32 if-end things are there to let the script know which list should be used. The same for the 32 if-end things at the end of the code.
Code: | #define command,autocomplete
:Autocomplete
%%editbox = %1
%%list = %2
if @equal(%%list,1)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete1
end
if @equal(%%list,2)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete2
end
if @equal(%%list,3)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete3
end
if @equal(%%list,4)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete4
end
if @equal(%%list,5)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete5
end
if @equal(%%list,6)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete6
end
if @equal(%%list,7)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete7
end
if @equal(%%list,8)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete8
end
if @equal(%%list,9)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete9
end
if @equal(%%list,10)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete10
end
if @equal(%%list,11)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete11
end
if @equal(%%list,12)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete12
end
if @equal(%%list,13)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete13
end
if @equal(%%list,14)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete14
end
if @equal(%%list,15)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete15
end
if @equal(%%list,16)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete16
end
if @equal(%%list,17)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete17
end
if @equal(%%list,18)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete18
end
if @equal(%%list,19)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete19
end
if @equal(%%list,20)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete20
end
if @equal(%%list,21)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete21
end
if @equal(%%list,22)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete22
end
if @equal(%%list,23)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete23
end
if @equal(%%list,24)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete24
end
if @equal(%%list,25)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete25
end
if @equal(%%list,26)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete26
end
if @equal(%%list,27)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete27
end
if @equal(%%list,28)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete28
end
if @equal(%%list,29)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete29
end
if @equal(%%list,30)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete30
end
if @equal(%%list,31)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete31
end
if @equal(%%list,32)
parse "%%oldeditboxtext;%%oldtext",%%autocomplete32
end
if @equal(%%oldeditboxtext,@dlgtext(%%editbox))
exit
end
list seek,%%list,0
%%cursorpos = @diff(@sendmsg(@win(~%%editbox),$0B0,0,0),@prod(@div(@sendmsg(@win(~%%editbox),$0B0,0,0),65536),65536))
%%currenttext = @substr(@dlgtext(%%editbox),1,%%cursorpos)
if @equal(@len(%%oldtext),@len(%%currenttext))
exit
end
%%oldtext = %%currenttext
if @match(%%list,@dlgtext(%%editbox))
if @equal(@substr(@item(%%list),1,@len(%%currenttext)),%%currenttext)
dialog set,%%editbox,@item(%%list)
%%setselection = @sendmsg(@win(~%%editbox),$0B1,%%cursorpos,9999)
end
end
%%oldeditboxtext = @dlgtext(%%editbox)
if @equal(%%list,1)
%%autocomplete1 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,2)
%%autocomplete2 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,3)
%%autocomplete3 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,4)
%%autocomplete4 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,5)
%%autocomplete5 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,6)
%%autocomplete6 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,7)
%%autocomplete7 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,8)
%%autocomplete8 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,9)
%%autocomplete9 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,10)
%%autocomplete10 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,11)
%%autocomplete11 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,12)
%%autocomplete12 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,13)
%%autocomplete13 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,14)
%%autocomplete14 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,15)
%%autocomplete15 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,16)
%%autocomplete16 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,17)
%%autocomplete17 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,18)
%%autocomplete18 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,19)
%%autocomplete19 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,20)
%%autocomplete20 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,21)
%%autocomplete21 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,22)
%%autocomplete22 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,23)
%%autocomplete23 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,24)
%%autocomplete24 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,25)
%%autocomplete25 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,26)
%%autocomplete26 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,27)
%%autocomplete27 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,28)
%%autocomplete28 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,29)
%%autocomplete29 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,30)
%%autocomplete30 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,31)
%%autocomplete31 = %%oldeditboxtext|%%oldtext
end
if @equal(%%list,32)
%%autocomplete32 = %%oldeditboxtext|%%oldtext
end
exit |
Edit 1: I've putted the #define command,autocomplete in, because that way you can test the script like a .dsc file as well. It isn't necessary when compiling it to .dsu. _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 21, 2003 9:30 pm Post subject: |
|
|
Simple but effective. I like it. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Jul 16, 2003 5:23 pm Post subject: |
|
|
Nice if U have a limited options needed for a box else using SHLWAPI.dll and getting the full capabilities of windows autocomplete may be more helpful. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|