| View previous topic :: View next topic |
| Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Fri Jul 10, 2009 2:00 pm Post subject: |
|
|
I can understand getting the buttons and moving them around, but not removing the menus and title bar. Care to share that info? Is the OSK on Vista/Windows 7 the same way? _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Jul 13, 2009 12:40 am Post subject: |
|
|
| LiquidCode wrote: | | I can understand getting the buttons and moving them around, but not removing the menus and title bar. Care to share that info? Is the OSK on Vista/Windows 7 the same way? |
Below is the code to do all these things for you... Now I have no idea if this works in Windows 7 however I have tested it under Vista. I was not aware that Windows 7 was officially out yet... Please make sure you read the comments... I would say that the hard part is done
| Code: |
# need these functions to control the titlebar...
#DEFINE FUNCTION,SSBitAND
#DEFINE FUNCTION,SSBitXOR
#DEFINE FUNCTION,SSBitOR
#DEFINE FUNCTION,SSBitNOT
#DEFINE FUNCTION,SSHex2Dec
#DEFINE FUNCTION,SSDec2Bin
#DEFINE FUNCTION,SSBin2Dec
#DEFINE FUNCTION,SSBitRShift
#DEFINE FUNCTION,SSBitLShift
#DEFINE FUNCTION,SSRGB
#DEFINE FUNCTION,BASECONV
#DEFINE FUNCTION,VDSFPOW
Loadlib user32.dll
# Launch the osk.exe... UAC in Vista caused me to use the shell command.
Shell Open,c:\windows\system32\osk.exe
Repeat
%%osk_window = @winexists(#OSKMainClass)
Until %%osk_window
wait 0.1
# Hide the osk window until we adjust it.
Window Hide,%%osk_window
# Remove the menubar
%%MainMenu = @lib(user32,GetMenu,INT,INT:@strdel(%%osk_window,1,1))
%A = @lib(user32,SetMenu,BOOL,INT:@strdel(%%osk_window,1,1),NIL:)
%A = @lib(user32,DrawMenuBar,BOOL,INT:@strdel(%%osk_window,1,1))
%A = @lib(user32,DestroyMenu,BOOL,INT:%%MainMenu)
# Remove the title bar... Note Vista Aero shows the titlebar with
# no minimize, maximize buttons.
%%WndStyle = @lib(user32,GetWindowLongA,INT,INT:@strdel(%%osk_window,1,1),INT:-16)
%%NewWndStyle = @SSBitAnd(%%WndStyle,@SSBitNot($C00000))
%A = @lib(user32,SetWindowLongA,INT,INT:@strdel(%%osk_window,1,1),INT:-16,INT:%%NewWndStyle)
# Position the Osk window at the bottom of the sceen.
# You may need to adjust for the taskbar
# Or you could hide the taskbar and place the keyboard at the bottom.
Window Position,%%osk_window,@diff(@sysinfo(SCREENHEIGHT),225),0,@sysinfo(SCREENWIDTH),195
# Loop through the buttons and adjust them to our liking
%%osk_child = @window(%%osk_window,child)
While %%osk_child
If @Equal(@wintext(%%osk_child),F1)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F2)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F3)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F4)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F5)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F6)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F7)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F8)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F9)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F10)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F11)
WINDOW HIDE,%%osk_child
ElsIf @Equal(@wintext(%%osk_child),F12)
WINDOW HIDE,%%osk_child
End
%%osk_child = @window(%%osk_child,NEXT)
Wend
# Now show the osk window and activate it.
Window Normal,%%osk_window
Window Activate,%%osk_window
# Now if you wanted to you could build a dialog with a taskbar icon
# to control the use of the osk.
# However since this is a demo I will end osk.exe in 1 minute
wait 60
Window close,%%osk_window
FreeLib user32
Exit
:SSBitAnd
%%SSBAresult = ""
%%SSBA1 = @SSDec2Bin(%1)
%%SSBA2 = @SSDec2Bin(%2)
IF @GREATER(@LEN(%%SSBA1),@LEN(%%SSBA2))
%%SSBAStop = @LEN(%%SSBA1)
%%SSBACheck = 1
ELSE
%%SSBAStop = @LEN(%%SSBA2)
%%SSBACheck = 2
END
WHILE @NOT(@EQUAL(@LEN(%%SSBA2),@LEN(%%SSBA1)))
IF @EQUAL(%%SSBACheck,1)
%%SSBA2 = "0"%%SSBA2
ELSE
%%SSBA1 = "0"%%SSBA1
END
WEND
%%SSBAX = 1
REPEAT
IF @BOTH(@EQUAL(@SUBSTR(%%SSBA1,%%SSBAX,%%SSBAX),1),@EQUAL(@SUBSTR(%%SSBA2,%%SSBAX,%%SSBAX),1))
%%SSBAResult = %%SSBAResult"1"
ELSE
%%SSBAResult = %%SSBAResult"0"
END
%%SSBAX = @SUCC(%%SSBAX)
UNTIL @GREATER(%%SSBAX,%%SSBAStop)
%%SSBAresult = @SSBin2Dec(%%SSBAresult)
exit %%SSBAresult
:SSBitOR
%%SSBOresult = ""
%%SSBO1 = @SSDec2Bin(%1)
%%SSBO2 = @SSDec2Bin(%2)
IF @GREATER(@LEN(%%SSBO1),@LEN(%%SSBO2))
%%SSBOStop = @LEN(%%SSBO1)
%%SSBOCheck = 1
ELSE
%%SSBOStop = @LEN(%%SSBO2)
%%SSBOCheck = 2
END
WHILE @NOT(@EQUAL(@LEN(%%SSBO2),@LEN(%%SSBO1)))
IF @EQUAL(%%SSBOCheck,1)
%%SSBO2 = "0"%%SSBO2
ELSE
%%SSBO1 = "0"%%SSBO1
END
WEND
%%SSBOX = 1
REPEAT
IF @EQUAL(@SUBSTR(%%SSBO1,%%SSBOX,%%SSBOX),1)@EQUAL(@SUBSTR(%%SSBO2,%%SSBOX,%%SSBOX),1)
%%SSBOResult = %%SSBOResult"1"
ELSE
%%SSBOResult = %%SSBOResult"0"
END
%%SSBOX = @SUCC(%%SSBOX)
UNTIL @GREATER(%%SSBOX,%%SSBOStop)
%%SSBOresult = @SSBin2Dec(%%SSBOresult)
exit %%SSBOresult
:SSBitXOR
%%SSBXOresult = ""
%%SSBXO1 = @SSDec2Bin(%1)
%%SSBXO2 = @SSDec2Bin(%2)
IF @GREATER(@LEN(%%SSBXO1),@LEN(%%SSBXO2))
%%SSBXOStop = @LEN(%%SSBXO1)
%%SSBXOCheck = 1
ELSE
%%SSBXOStop = @LEN(%%SSBXO2)
%%SSBXOCheck = 2
END
WHILE @NOT(@EQUAL(@LEN(%%SSBXO2),@LEN(%%SSBXO1)))
IF @EQUAL(%%SSBXOCheck,1)
%%SSBXO2 = "0"%%SSBXO2
ELSE
%%SSBXO1 = "0"%%SSBXO1
END
WEND
%%SSBXOX = 1
REPEAT
IF @BOTH(@EQUAL(@SUBSTR(%%SSBXO1,%%SSBXOX,%%SSBXOX),1),@EQUAL(@SUBSTR(%%SSBXO2,%%SSBXOX,%%SSBXOX),1))
%%SSBXOResult = %%SSBXOResult"0"
ELSIF @BOTH(@ZERO(@SUBSTR(%%SSBXO1,%%SSBXOX,%%SSBXOX)),@ZERO(@SUBSTR(%%SSBXO2,%%SSBXOX,%%SSBXOX)))
%%SSBXOResult = %%SSBXOResult"0"
ELSE
%%SSBXOResult = %%SSBXOResult"1"
END
%%SSBXOX = @SUCC(%%SSBXOX)
UNTIL @GREATER(%%SSBXOX,%%SSBXOStop)
%%SSBXOresult = @SSBin2Dec(%%SSBXOresult)
exit %%SSBXOresult
#:SSDec2Bin
# %%SSD2Bresult = ""
# %%SSD2BintValue = %1
# While @GREATER(%%SSD2BintValue,0)
# %%SSD2Bi = @MOD(%%SSD2BIntValue,2)
# %%SSD2Bi = @FADD(%%SSD2Bi,1)
# %%SSD2BintValue = @DIV(%%SSD2BintValue,2)
# %%SSD2Bresult = @SUBSTR("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",%%SSD2Bi,%%SSD2Bi)%%SSD2Bresult
# WEND
# exit %%SSD2Bresult
:SSDec2Bin
# Replaced with a central function to perform generic base conversions.
%%SSD2BintValue = %1
%%SSD2Bresult = @BaseConv(%%SSD2BintValue,10,2)
Exit %%SSD2Bresult
#:SSBin2Dec
# %%SSB2DResult = 0
# %%SSB2DX = 1
# %%SSB2DStrValue = %1
# REPEAT
# %%SSB2DCharValue = @POS(@UPPER(@SUBSTR(%%SSB2DStrValue,%%SSB2DX,%%SSB2DX)),"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#return -1 if character is not supported by base
# If @GREATER(%%SSB2DCharValue,2)
# %%SSB2DResult = -1
# %%SSB2DX = @SUCC(@LEN(%%SSB2DStrValue))
# END
# %%SSB2DResult = @FADD(@FMUL(%%SSB2DResult,2),@FSUB(%%SSB2DcharValue,1))
# %%SSB2DX = @SUCC(%%SSB2DX)
# UNTIL @GREATER(%%SSB2DX,@LEN(%%SSB2DStrValue))
# exit %%SSB2DResult
:SSBin2Dec
# Replaced with a central function to perform generic base conversions.
%%SSB2DStrValue = %1
%%SSB2Dresult = @BaseConv(%%SSB2DStrValue,2,10)
Exit %%SSB2Dresult
#:SSHex2Dec
# %%SSH2DHex = %1
# %%SSH2D = 0
# %%SSH2DX = 1
# repeat
# %%SSH2DChar = @UPPER(@SUBSTR(%%SSH2DHex,%%SSH2DX,%%SSH2DX))
# %%SSH2DPos = @FSUB(@POS(%%SSH2DChar,"0123456789ABCDEF"),1)
# %%SSH2D = @FADD(@FMUL(%%SSH2D,16),%%SSH2DPos)
# %%SSH2DX = @SUCC(%%SSH2DX)
# until @GREATER(%%SSH2DX,@LEN(%%SSH2DHex))
# exit %%SSH2D
:SSHex2Dec
# Replaced with a central function to perform generic base conversions.
%%SSH2DHex = %1
%%SSH2D = @BaseConv(%%SSH2DHex,16,10)
Exit %%SSH2D
:SSBitNOT
%1 = @sum(%1,0)
if @Equal(@Pos(-,%1),1)
%%SSBitNot = @diff(@StrDel(%1,1),1)
Else
%%SSBitNot = @diff(-%1,1)
End
Exit %%SSBitNot
:SSBitRShift
%%SSBRSresult = " "
%%SSBRS1 = ""
%%SSBRS2 = @SSDec2Bin(%1)
%%SSBRSx = 0
repeat
%%SSBRS1 = %%SSBRS1"0"
%%SSBRSx = @SUCC(%%SSBRSx)
until @EQUAL(%%SSBRSx,%2)
%%SSBRS1 = %%SSBRS1%%SSBRS2
%%SSBRSresult = @SSBin2Dec(@SUBSTR(%%SSBRS1,1,@LEN(%%SSBRS2)))
exit %%SSBRSresult
:SSBitLShift
%%SSBLSresult = " "
%%SSBLS1 = @SSDec2Bin(%1)
%%SSBLS2 = @SSDec2Bin(%1)
%%SSBLSx = 0
repeat
%%SSBLS1 = %%SSBLS1"0"
%%SSBLSx = @SUCC(%%SSBLSx)
until @EQUAL(%%SSBLSx,%2)
REM if (@GREATER(@LEN(%%SSBLS1),8)
REM %%SSBLScut = @FSUB(@LEN(%%SSBLS1),8)
REM %%SSBLSresult = @SSBin2Dec(@SUBSTR(%%SSBLS1,%%SSBLScut,@SUM(%%SSBLScut,8)))
REM else
%%SSBLSresult = @SSBin2Dec(%%SSBLS1)
REM end
exit %%SSBLSresult
:SSRGB
%%SSRed = %1
%%SSGreen = %2
%%SSBlue = %3
%%SSGreen = @SSBitLShift(%%SSGreen,8)
%%SSBlue = @SSBitLShift(%%SSBlue,16)
%%SSRGBResult = @SSBitOR(%%SSRed,%%SSGreen)
%%SSRGBResult = @SSBitOR(%%SSRGBResult,%%SSBLue)
exit %%SSRGBResult
:BaseConv
# This function will convert any number base to any number base from base2 to base62
# Returns the %%InNumber variable as %R converted to the requested base in %%OutBase.
%R =
# Value to convert
%%InNumber = %1
# Base for %%InNumber
%%InBase = %2
# Base to convert %%InNumber too
%%OutBase = %3
# Data dictionary
%D = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
%%MaxBase = @len(%D)
%%DecVal = 0
If @Greater(%%InBase,%%MaxBase)@Greater(%%OutBase,%%MaxBase)@Less(%%InBase,2)@Less(%%OutBase,2)
# If the bases specified are above 62 or below 2 throw Arithmetic error
Error 26
Else
# Start by converting the value to Base10
%%InNumberLen = @Len(%%InNumber)
%%DecVal = 0
%J = 1
Repeat
%K = 1
Repeat
# Hmmm I wouldn't try to figure this loop out just use the converter....:)
# Basicly it treats the %D data dictionary and the input value like the old decoder rings.
# I guess I am showing my age with this one lol...
If @Equal(@substr(%%InNumber,%J,%J),@SubStr(%D,%K,%K),EXACT)
%%DecVal = @Sum(%%DecVal,@Name(@fadd(@fmul(@pred(%K),@VDSFPow(%%InBase,@diff(%%InNumberLen,%J))),.5)))
end
%K = @succ(%K)
Until @Greater(%K,%%InBase)
%J = @succ(%J)
Until @Greater(%J,%%InNumberLen)
# Now convert the value to the requested Base
Repeat
%X = @Mod(%%DecVal,%%OutBase)
If @Greater(%X,9)
%X = @succ(%X)
%R = @substr(%D,%X,%X)%R
Else
%R = %X%R
End
%%DecVal = @div(%%DecVal,%%OutBase)
Until @Zero(%%DecVal)
End
Exit %R
:VDSFPOW
# A simple function to raise a number
# to the power of some number using the VDS
# builtin floating point arithmitic functions
#x = a^b
%a = %1
%b = %2
%%aisneg = @pos(-,%a)
%%bisneg = @pos(-,%b)
If @equal(%%aisneg,1)
%a = @strdel(%a,1)
End
%x = @fmul(%b,@fln(%a))
if @equal(%%aisneg,1)
# really needs a floating mod here but if your concerned
# about not having a floating point mod then you can use
# the GadgetX.dll @lfmod function.
%%iseven = @mod(@fint(%b),2)
if @Zero(%%iseven)
%x = @fexp(%x)
else
%x = -@fexp(%x)
end
else
%x = @fexp(%x)
end
Exit %x
|
Enjoy and as soon as I can get a copy of Windows 7 I will test it but I would imagine that these simple Win32 things that work in Vista will work in Windows 7  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Mon Jul 13, 2009 1:55 am Post subject: |
|
|
Thank you so much!! Windows 7 isn't officially out, but I just thought I'd ask. I don't have it either. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Mon Jul 13, 2009 2:36 pm Post subject: |
|
|
The code works great, but I do have another question. Is there a way to completely remove the title bar? My client doesn't want it to be able to be moved. I can run through a loop to put it back to the right position it if does get moved, that's not a problem. I just wanted to know if the title can be removed w/o having to do that. Thanks. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Jul 14, 2009 12:24 pm Post subject: |
|
|
You can try to replace line 33
| Code: |
# to make the window none movable you can try and replace
# the line below
%%NewWndStyle = @SSBitAnd(%%WndStyle,@SSBitNot($C00000))
# with the following
%%WS_CAPTION = $C00000
%%WS_BORDER = $800000
%%NewWndStyle = @SSBitAnd(@SSBitAnd(%%WndStyle,@SSBitNot(%%WS_CAPTION)),@SSBitNot(%%WS_BORDER))
|
I just didn't like the look of the keyboard after doing this on Vista... Functional but it didn't look at pretty. What this does is remove the caption style and the border style of the window. This makes the window stationary and with the old-style title bar. For some reason Vista does not want to remove the title bar. Now I can still remove it but with brute force using Window Regions. With Window Regions you can define the shape of the window in question. It is just several lines more of code to do that and I am not sure if the VDS @lib() function is up to the challenge.  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Tue Jul 14, 2009 12:32 pm Post subject: |
|
|
Thank you so much. You have been a big help! I'll try it out today.  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Tue Aug 11, 2009 2:44 pm Post subject: |
|
|
I have another small issue. The background blue of the keyboard turns grey after a little or when the mouse passes over the blue of the keyboard. My client doesn't like that. My question is, is there a way to redraw/paint the keyboard background? I have tried a few ideas, but no luck.
Thanks _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 11, 2009 3:54 pm Post subject: |
|
|
Hmm yeah sometimes when the mouse is dragged over the osk window it is causing the window to loose it's background color. I may be able to write you some code to continously paint the background with a color. This is very unexpected. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 11, 2009 5:49 pm Post subject: |
|
|
I think I found the issue. When I remove the menu bar it does this. As long as the menu bar exists the window draws the background properly.  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 11, 2009 6:47 pm Post subject: |
|
|
Well I can easily resolve the issue in a loop using the following GadgetX code.
| Code: |
SetWin Background,Color,%%osk_window,$00BC8158
|
You would have to add WS_CLIPCHILDREN to the Window Style to make this work. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 11, 2009 9:45 pm Post subject: |
|
|
Anyway I don't remember what the issue was before but I modified your original code to build a working On Screen Keyboard so it would work without having to figure out what window was the last active Window. Below is the code you can use. At least until I can release an update to my GadgetX DLL which has a fix for the setting a window background color.
| Code: |
#define command,gosend,ReduceMemory,AddStyleEx
DIALOG CREATE,VDSOSK,-1,0,677,260,CLASS VDSOSK,ONTOP
REM *** Modified by Dialog Designer on 7/8/2009 - 14:23 ***
DIALOG ADD,GROUP,GROUP1,-7,-9,655,171,
#DIALOG ADD,BITMAP,back,0,0,565,144,#temp.bmp
DIALOG ADD,STATUS,S1,
DIALOG ADD,BUTTON,C_QUOTE_,2,2,40,40,`
DIALOG ADD,BUTTON,N_1_,2,41,40,40,1
DIALOG ADD,BUTTON,N_2_,2,80,40,40,2
DIALOG ADD,BUTTON,N_3_,2,119,40,40,3
DIALOG ADD,BUTTON,N_4_,2,158,40,40,4
DIALOG ADD,BUTTON,N_5_,2,197,40,40,5
DIALOG ADD,BUTTON,N_6_,2,236,40,40,6
DIALOG ADD,BUTTON,N_7_,2,275,40,40,7
DIALOG ADD,BUTTON,N_8_,2,314,40,40,8
DIALOG ADD,BUTTON,N_9_,2,353,40,40,9
DIALOG ADD,BUTTON,N_0_,2,392,40,40,0
DIALOG ADD,BUTTON,C_Dash_,2,431,40,40,-
DIALOG ADD,BUTTON,C_Equal_,2,470,40,40,=
DIALOG ADD,BUTTON,C_BkSpc_,2,509,40,40,BkSpc
DIALOG ADD,BUTTON,C_Del_,2,548,40,40,Del
DIALOG ADD,BUTTON,C_Up_,2,587,40,40,Up
DIALOG ADD,BUTTON,C_tab_,41,2,63,40,Tab
DIALOG ADD,BUTTON,L_Q_,41,64,40,40,Q
DIALOG ADD,BUTTON,L_W_,41,103,40,40,W
DIALOG ADD,BUTTON,L_E_,41,142,40,40,E
DIALOG ADD,BUTTON,L_R_,41,181,40,40,R
DIALOG ADD,BUTTON,L_T_,41,220,40,40,T
DIALOG ADD,BUTTON,L_Y_,41,259,40,40,Y
DIALOG SHOW
list create,1
LoadLib user32.dll
#Get id of window
%%vdsosk_id = @winexists(#VDSOSK)
# The next 2 lines is the magic that makes a on screen keyboard work
# make sure the dialog window is always ontop and this should work
%%WS_EX_NOACTIVATE = $08000000
AddStyleEx %%vdsosk_id,%%WS_EX_NOACTIVATE
:evloop
wait event,0.1
%e = @event()
option fieldsep,"_"
parse "%a;%b;%c",%e
option fieldsep,"|"
if @equal(%a,N)
%%num = %b
goto Number
elsif @equal(%a,C)
%%chr = %b
goto Char
elsif @equal(%a,L)
%%letter = %b
goto Letter
end
goto %e
:timer
if %r
if @not(@zero(%r))
# Grab the active window and control
%%wa = @winactive(C)
%%aw = %%wa
dialog set,s1,%%wa | %%aw | %%vdsosk_id | %r
end
end
goto evloop
:Number
gosend %%num
goto evloop
:Letter
if %%shift
gosend @upper(%%letter)
else
gosend @lower(%%letter)
end
goto evloop
:Char
if @equal(%%chr,quote)
gosend @chr(352)
elsif @equal(%%chr,Dash)
gosend "-"
elsif @equal(%%chr,Equal)
gosend "="
elsif @equal(%%chr,BkSpc)
gosend @chr(08)
elsif @equal(%%chr,Up)
gosend @key(UP)
elsif @equal(%%chr,Del)
gosend @key(Del)
end
goto evloop
:gosend
if %%wa
#Use send message to send the keys to the window
window send,%%wa,%1
dialog set,s1,%%aw | %%wa | @winclass(%%wa) | %1
end
exit
:close
FreeLib user32.dll
stop
:AddStyle
LoadLib user32.dll
%%WndStyle = @lib(user32,GetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-16)
%%NewWndStyle = @sum(%2,%%WndStyle)
%A = @lib(user32,SetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-16,INT:%%NewWndStyle)
Exit
:AddStyleEx
LoadLib user32.dll
%%WndStyleEx = @lib(user32,GetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-20)
%%NewWndStyleEx = @sum(%2,%%WndStyleEx)
%A = @lib(user32,SetWindowLongA,INT,INT:@strdel(%1,1,1),INT:-20,INT:%%NewWndStyleEx)
Exit
# --- Reduce Memory----
:ReduceMemory
loadlib "psapi.dll"
%t = @lib("psapi.dll","EmptyWorkingSet",INT:,-1)
freelib "psapi.dll"
exit
# End Redice Memory
|
Anyway sorry for the waste of time... VDS is able to do this and I finally figured out how to make it work. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Wed Aug 12, 2009 1:26 am Post subject: |
|
|
No prob! That's great that you figured out how to get it working. Thank you very much...again!  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1754 Location: Space and Time
|
Posted: Thu Aug 13, 2009 11:53 pm Post subject: |
|
|
I am now using the virtual key codes instead of windows send. It works a lot better. _________________ Chris
Http://theblindhouse.com |
|
| 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
|
|