Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Touch Screen Feature for Game Ex, I know it's a long shot.


Recommended Posts

Posted

I'm on to my next issue now. I am trying to figure out how I can call up a virtual keyboard when needed to enter names on my touchscreen. One awesome feature for TS users would be for Game Ex to have an always on top button that you could click on at anytime when you need to bring up a keyboard in a game.

Posted

An in game keyboard is unlikely (that's a complicated issue I won't get into), but one that can be brought up in GameEx is possible. What uses would you have for such a keyboard? I can only think of using it for searching out roms/media in the search feature.

Posted
An in game keyboard is unlikely (that's a complicated issue I won't get into), but one that can be brought up in GameEx is possible. What uses would you have for such a keyboard? I can only think of using it for searching out roms/media in the search feature.

I think you are missing the point here. On a Megatouch game system when you get your name up a keyboard comes up on screen for you to enter your name.

PopCap games work extremely well on a touchscreen monitor but when you get your name up, you need a keyboard to enter that information. I am trying to loose the keyboard.

Posted

Most modern versions of Windows come with a built in touch-screen compatible on-screen keyboard. Try clicking Start -> Run, type in osk.exe and click OK.

As for brining it up on command from a game, you'd have to program some sort of hotkey or something. It could be done I think.

Posted

I understand how they might be helpful in the game, but I was asking about in the FE. The problem with making them available in the game is that there are different ways to display graphics which would potentially require different keyboard display techniques (DirectX, Direct Draw, OpenGL, etc). That's way out of the scope of an FE add on IMO. But yeah, it would be really nice for SOMEONE to develop such an app (if it isn't already available in Windows).

Posted

If it will stay on top if you select it, then it could just be a gesture to bring it up. I'm not familiar with gestures, so it's possible you can do that right in that sort of program, but it might also require a script. I'd check over at the AHK or AI forums to see if someone has already developed something that will do exactly or nearly what you want. If you find something, let us know!

Posted

Here is the one I am currently using.

http://cnt.lakefolks.com/

It is free.

There is an always on top feature.

I am not sure how gestures work either, this is the first I have heard of them.

I do appreciate your thoughts. I know there is someway of doing this but I just need to figure out how.

Posted

I was just thinking about this. There are really 2 ways you can bring up your keyboard that are easy to use and implement:

1) touch gesture - There are probably lots of ways to do this including some fancy ones that track your gesture with color. I found a couple simple codes for AHK that could do this (currently without color). Check them out:

http://www.autohotkey.com/forum/topic25330.html

http://www.autohotkey.com/forum/topic1435.html

2) clicks in a location - Perhaps an easier way would be to use a multiple touch in a location to launch an action. So, for example, you could have the lower right quarter of your screen accept a triple touch and then bring up the keyboard. You would obviously want to make it a safe location to touch, but you get the idea. This can be implemented with AHK really easily! The following code does the click detection. The only thing that needs to be added is a limit on region of the screen (if desired):

http://www.autohotkey.com/forum/topic37297.html

Posted

This is great news but I don't know all that much about AHK. Would it be possible for you to compile me a script for testing?

A triple tap in the upper right hand corner of the screen seems like a great idea! If there is someway to do that and bring up the keyboard program above from the system try, that would be AMAZING!

Posted

AHK is a scripting language that doesn't require compiling. It can be compiled though, which makes distribution easier. I'd suggest installing AHK and trying the multi-click scripts linked above to make sure they even work with a touch screen the way you want. I think these were set up to be right clicks (which touch screens don't have). So, changing them to left click should do the trick. Like I said, it should be easy enough to only have the script run if it's in a region, but that's a touch extra code. Try this: (Note that triple click quits)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LEFT CLICKS REMAP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


LButton::

Loop
{
KeyWait, LButton, D ; Wait for LButton to be pressed
KeyWait, LButton, T0.5 ; and released within 0.5 sec
If ( ErrorLevel = 1 ) ; Timed out, hold detected
{
MsgBox, Hold
Continue
}
KeyWait, LButton, D T0.2 ; Wait for RB to be pressed a 2nd time
If ( ErrorLevel = 1 ) ; Timed out, single click detected
{
MsgBox, Single Click
Continue
}
KeyWait, LButton, T0.2 ; and released within 0.2 sec
If ( ErrorLevel = 1 ) ; Timed out, double hold detected
{
MsgBox, Double hold
Continue
}
KeyWait, LButton, D T0.2 ; Wait for RB to be pressed a 3rd time
If ( ErrorLevel = 1 ) ; Timed out, double click detected
{
MsgBox, Double Click
Continue
}
KeyWait, LButton, T0.2 ; and released within 0.2 sec
If ( ErrorLevel = 1 ) ; Timed out, triple hold detected
{
MsgBox, Triple hold
Continue
}
MsgBox, Triple Click ; No time out, triple click detected
ExitApp
}

multi_click.zip

Posted

I don't know if it will work at all, so if you try running the .exe and it works, then we can go from there. The code I used to compile the .exe is as posted.

I was playing with this on Friday and it looked like there may be an issue with the code stealing control of your mouse clicks. If that's true on your touch screen too, then you will probably need to have the code changed (not sure how yet) or use a different technique. Before you run this, make sure you have a keyboard connected so that you can kill the code. If it's running and you can't click the screen, then it will be difficult to stop it from running.

Posted
I don't know if it will work at all, so if you try running the .exe and it works, then we can go from there. The code I used to compile the .exe is as posted.

I was playing with this on Friday and it looked like there may be an issue with the code stealing control of your mouse clicks. If that's true on your touch screen too, then you will probably need to have the code changed (not sure how yet) or use a different technique. Before you run this, make sure you have a keyboard connected so that you can kill the code. If it's running and you can't click the screen, then it will be difficult to stop it from running.

It works.

Posted

Can you do other things while this code is running? When I was using my mouse and running this code, it wouldn't let me select anything on the screen until I stopped the script from running. If that is true on your system, then it won't work the way it needs to.

Posted
Can you do other things while this code is running? When I was using my mouse and running this code, it wouldn't let me select anything on the screen until I stopped the script from running. If that is true on your system, then it won't work the way it needs to.

It did the same thing on my end. =[

Posted

That's too bad. When I looked at those threads earlier, that was a side effect that was mentioned and unfortunately one that no one had addressed. There may be another way to do this, but I'm not sure of anything at the moment. Perhaps there's a freeware package that can do this? Not sure really.

Posted

So I found another script that might work better. It needs to be modified, but first you need to see if it causes any problems in general. The original thread is at

http://www.autohotkey.com/forum/topic43726...ht=triple+click

The code is:

~LButton::RapidHotkey("#d""#e",3);pressing 3 times shows Desktop and 4 times Windows Explorer















RapidHotkey(keystroke, times="2", delay=0.2, IsLabel=0)
{
Pattern := Morse(delay*1000)
If (StrLen(Pattern) < 2 and Chr(Asc(times)) != "1")
Return
If (times = "" and InStr(keystroke, """"))
{
Loop, Parse, keystroke,""
If (StrLen(Pattern) = A_Index+1)
continue := A_Index, times := StrLen(Pattern)
}
Else if (RegExMatch(times, "^\d+$") and InStr(keystroke, """"))
{
Loop, Parse, keystroke,""
If (StrLen(Pattern) = A_Index+times-1)
times := StrLen(Pattern), continue := A_Index
}
Else if InStr(times, """")
{
Loop, Parse, times,""
If (StrLen(Pattern) = A_LoopField)
continue := A_Index, times := A_LoopField
}
Else if (times = "")
continue = 1, times = 2
Else if (times = StrLen(Pattern))
continue = 1
If !continue
Return
Loop, Parse, keystroke,""
If (continue = A_Index)
keystr := A_LoopField
Loop, Parse, IsLabel,""
If (continue = A_Index)
IsLabel := A_LoopField
hotkey := RegExReplace(A_ThisHotkey, "[\*\~\$\#\+\!\^]")
IfInString, hotkey, %A_Space%
StringTrimLeft, hotkey,hotkey,% InStr(hotkey,A_Space,1,0)
Loop % times
backspace .= "{Backspace}"
keywait = Ctrl|Alt|Shift|LWin|RWin
Loop, Parse, keywait, |
KeyWait, %A_LoopField%
If ((!IsLabel or (IsLabel and IsLabel(keystr))) and InStr(A_ThisHotkey, "~") and !RegExMatch(A_ThisHotkey
, "i)\^[^\!\d]|![^\d]|#|Control|Ctrl|LCtrl|RCtrl|Shift|RShift|LShift|RWin|LWin|Escape|BackSpace|F\d\d?|"
. "Insert|Esc|Escape|BS|Delete|Home|End|PgDn|PgUp|Up|Down|Left|Right|ScrollLock
|CapsLock|NumLock|AppsKey|"
. "PrintScreen|CtrlDown|Pause|Break|Help|Sleep|Browser_Back|Browser_Forward|Bro
wser_Refresh|Browser_Stop|"
. "Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume
_Up|MButton|RButton|LButton|"
. "Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|L
aunch_App1|Launch_App2"))
Send % backspace
If (WinExist("AHK_class #32768") and hotkey = "RButton")
WinClose, AHK_class #32768
If !IsLabel
Send % keystr
else if IsLabel(keystr)
Gosub, %keystr%
Return
}
Morse(timeout = 400) {;by Laszo -> http://www.autohotkey.com/forum/viewtopic.php?t=16951 (Modified to return: KeyWait %key%, T%tout%)
tout := timeout/1000
key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
IfInString, key, %A_Space%
StringTrimLeft, key, key,% InStr(key,A_Space,1,0)
Loop {
t := A_TickCount
KeyWait %key%, T%tout%
Pattern .= A_TickCount-t > timeout
If(ErrorLevel)
Return Pattern
KeyWait %key%,DT%tout%
If (ErrorLevel)
Return Pattern
}
}

And the compiled version is attached.

Also, you might want to try using a mouse gesture program for this. I read that StrokeIt is good, but I have no experience with it. I tried going to strokeit.com, but that was not the right web site :blink:

http://www.tcbmi.com/strokeit/

show_desktop.zip

Posted

Well, I'm not sure how to simplify the code at the moment since a lot of the functions are not ones I've used before, but this does work:

~LButton::RapidHotkey("#d""#e",3);pressing 3 times shows Desktop and 4 times Windows Explorer















RapidHotkey(keystroke, times="2", delay=0.2, IsLabel=0)
{
Pattern := Morse(delay*1000)
If (StrLen(Pattern) < 2 and Chr(Asc(times)) != "1")
Return
If (times = "" and InStr(keystroke, """"))
{
Loop, Parse, keystroke,""
If (StrLen(Pattern) = A_Index+1)
continue := A_Index, times := StrLen(Pattern)
}
Else if (RegExMatch(times, "^\d+$") and InStr(keystroke, """"))
{
Loop, Parse, keystroke,""
If (StrLen(Pattern) = A_Index+times-1)
times := StrLen(Pattern), continue := A_Index
}
Else if InStr(times, """")
{
Loop, Parse, times,""
If (StrLen(Pattern) = A_LoopField)
continue := A_Index, times := A_LoopField
}
Else if (times = "")
continue = 1, times = 2
Else if (times = StrLen(Pattern))
continue = 1
If !continue
Return
Loop, Parse, keystroke,""
If (continue = A_Index)
keystr := A_LoopField
Loop, Parse, IsLabel,""
If (continue = A_Index)
IsLabel := A_LoopField
hotkey := RegExReplace(A_ThisHotkey, "[\*\~\$\#\+\!\^]")
IfInString, hotkey, %A_Space%
StringTrimLeft, hotkey,hotkey,% InStr(hotkey,A_Space,1,0)
Loop % times
backspace .= "{Backspace}"
keywait = Ctrl|Alt|Shift|LWin|RWin
Loop, Parse, keywait, |
KeyWait, %A_LoopField%
If ((!IsLabel or (IsLabel and IsLabel(keystr))) and InStr(A_ThisHotkey, "~") and !RegExMatch(A_ThisHotkey
, "i)\^[^\!\d]|![^\d]|#|Control|Ctrl|LCtrl|RCtrl|Shift|RShift|LShift|RWin|LWin|Escape|BackSpace|F\d\d?|"
. "Insert|Esc|Escape|BS|Delete|Home|End|PgDn|PgUp|Up|Down|Left|Right|ScrollLock
|CapsLock|NumLock|AppsKey|"
. "PrintScreen|CtrlDown|Pause|Break|Help|Sleep|Browser_Back|Browser_Forward|Bro
wser_Refresh|Browser_Stop|"
. "Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume
_Up|MButton|RButton|LButton|"
. "Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|L
aunch_App1|Launch_App2"))
Send % backspace
If (WinExist("AHK_class #32768") and hotkey = "LButton")
WinClose, AHK_class #32768
MouseGetPos, xpos, ypos
if (xpos>A_ScreenWidth-100 and ypos>A_ScreenHeight-100)
run, test.ahk
Return
}
Morse(timeout = 400) {;by Laszo -> http://www.autohotkey.com/forum/viewtopic.php?t=16951 (Modified to return: KeyWait %key%, T%tout%)
tout := timeout/1000
key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
IfInString, key, %A_Space%
StringTrimLeft, key, key,% InStr(key,A_Space,1,0)
Loop {
t := A_TickCount
KeyWait %key%, T%tout%
Pattern .= A_TickCount-t > timeout
If(ErrorLevel)
Return Pattern
KeyWait %key%,DT%tout%
If (ErrorLevel)
Return Pattern
}
}

Then, you also need the test.ahk file:

msgbox test successful

I've attached a zipped and compiled version for you.

Basically, this just needs to have the one line where it calls the test script modified to call your keyboard instead. I have it set up so that a triple click in the lower right corner (within 100 pixels of the bottom and right edge) will fire the test script. I think it should be good to go.

StartKeyboard.zip

Posted

If you use the exe, then you just run it and verify that it will run the test.exe file. Once you know that works, you can modify the source and change the call:

Run, Test.exe

to

Run, C:\Program Files\keyboard software directory\keyboard.exe

Obviously you will need to enter the correct location for the exe and any command line parameters that may be needed. Then you can compile it with AHK into an exe and you'll be done! If you don't want to install AHK for whatever reason, post the code and I can up the exe for you.

Posted
If you use the exe, then you just run it and verify that it will run the test.exe file. Once you know that works, you can modify the source and change the call:

Run, Test.exe

to

Run, C:\Program Files\keyboard software directory\keyboard.exe

Obviously you will need to enter the correct location for the exe and any command line parameters that may be needed. Then you can compile it with AHK into an exe and you'll be done! If you don't want to install AHK for whatever reason, post the code and I can up the exe for you.

I've been following this thread a bit, as I'm hoping for the same type of thing on my touchscreen (when it arrives). I've been building my gameex front end on a portable harddrive, and I'm going to copy over when it gets here.

I ran this script, and the test works! It's actually pretty cool. My question is, how will this script start? Is there a way for it to open when GameEx is launched, or will it need to be opened manually before each time? I'm not very knowledgable with this kind of stuff, but I would think thats a simple code, right? This would be especially helpful if I ever decide to have GameEx launch on bootups.

Posted
If you use the exe, then you just run it and verify that it will run the test.exe file. Once you know that works, you can modify the source and change the call:

Run, Test.exe

to

Run, C:\Program Files\keyboard software directory\keyboard.exe

Obviously you will need to enter the correct location for the exe and any command line parameters that may be needed. Then you can compile it with AHK into an exe and you'll be done! If you don't want to install AHK for whatever reason, post the code and I can up the exe for you.

If you don't mind just for the simply fact I make sure everything is right.

path = C:\Program Files\Click-N-Type\Click-N-Type.exe

Thank You

Guest
This topic is now closed to further replies.
×
×
  • Create New...