 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Moby Guest
|
Posted: Thu Aug 11, 2005 2:42 pm Post subject: Help with Script |
|
|
I need help on this script.
Basically i want it so you type something in and the keystrokes are the same, but when it goes through the fileappend, the text document has the translated.
| Code: | Inputbox,output,Digital Enigma,Enter Text to be translated, 50, 600
Fileappend, %output%, C:\test.txt
#UseHook
SetStoreCapslockMode Off
q::Send m
w::Send n
e::Send b
r::Send v
t::Send c
y::Send x
u::Send z
i::Send l
o::Send k
p::Send j
a::Send h
s::Send g
d::Send f
f::Send d
g::Send s
h::Send a
j::Send p
k::Send o
l::Send i
z::Send u
x::Send y
c::Send t
v::Send r
b::Send e
n::Send w
m::Send q
1::Send 0
2::Send 9
3::Send 8
4::Send 7
5::Send 6
6::Send 5
7::Send 4
8::Send 3
9::Send 2
0::Send 1
Exitapp |
Basically what you type comes out correct,
but the saved file (fileappend) has the translated input.
If that makes any sense
Any help please
P.S I use the word 'translated' because i cant think of any other word  |
|
| Back to top |
|
 |
jeex
Joined: 25 Jan 2005 Posts: 23 Location: Netherlands
|
Posted: Thu Aug 11, 2005 3:41 pm Post subject: Sk Wahc'g cab jvkeibq? |
|
|
Sorry, your nifty AHK was still running.
So what's the problem? It works fine. Or do i understand you want the originally typed text in the textfile, rather than the translated text?
gr VP |
|
| Back to top |
|
 |
Moby Guest
|
Posted: Thu Aug 11, 2005 4:11 pm Post subject: |
|
|
What you type into the input box is correct, as shown above.
P.S I had to edit the script to make it look like that.
This is a photo of what it looks like at the moment, because of the #UseHook command it doesnt present itself correct.
This is the picture of what the #UseHook command changes 'this is a test' into.
What i am looking for is when you type into the inputbox, it is normal and nothing is done to it.
When it is saved (fileappend) it has the translated text. |
|
| Back to top |
|
 |
tpatel5
Joined: 27 Oct 2004 Posts: 65 Location: GA
|
Posted: Thu Aug 11, 2005 5:00 pm Post subject: |
|
|
you can do something like this:
| Code: | Inputbox,output,Digital Enigma,Enter Text to be translated, 50, 600
Autotirm, off
Loop, Parse, output
{
var1:= A_loopfield
var2:= replace(var1)
write = %write%%var2%
}
Fileappend, %write%, C:\test.txt
;----------------------------------------------------------------------
;function
;----------------------------------------------------------------------
replace(ab)
{
If ab = q
return "m"
If ab = w
return "n"
If ab = e
return "b"
If ab = r
return "v"
If ab = t
return "c"
If ab = y
return "x"
If ab = u
return "z"
If ab = i
return "l"
If ab = o
return "k"
If ab = p
return "j"
If ab = a
return "h"
If ab = s
return "g"
If ab = d
return "f"
If ab = f
return "d"
If ab = g
return "s"
If ab = h
return "a"
If ab = j
return "p"
If ab = k
return "o"
If ab = l
return "i"
If ab = z
return "u"
If ab = x
return "y"
If ab = c
return "t"
If ab = v
return "r"
If ab = b
return "e"
If ab = n
return "w"
If ab = m
return "q"
If ab = 1
return 0
If ab = 2
return 9
If ab = 3
return 8
If ab = 4
return 7
If ab = 5
return 6
If ab = 6
return 5
If ab = 7
return 4
If ab = 8
return 3
If ab = 9
return 2
If ab = 0
return 1
else
return ab
} |
_________________ -Tru 
Last edited by tpatel5 on Thu Aug 11, 2005 6:17 pm; edited 1 time in total |
|
| Back to top |
|
 |
Moby Guest
|
Posted: Thu Aug 11, 2005 5:45 pm Post subject: |
|
|
Thank you!!!
Its exactly what i wanted.
I also made the decoder for it if anyone is interested in this
| Code: | Inputbox,output,Digital Enigma,Enter Text to be translated, 50, 600
Autotrim, off
Loop, Parse, output
{
var1:= A_loopfield
var2:= replace(var1)
write = %write%%var2%
}
Fileappend, %write%, C:\test.txt
;----------------------------------------------------------------------
;function
;----------------------------------------------------------------------
replace(ab)
{
If ab = m
return "q"
If ab = n
return "w"
If ab = b
return "e"
If ab = v
return "r"
If ab = c
return "t"
If ab = x
return "y"
If ab = z
return "u"
If ab = l
return "i"
If ab = k
return "o"
If ab = j
return "p"
If ab = h
return "a"
If ab = g
return "s"
If ab = f
return "d"
If ab = d
return "f"
If ab = s
return "g"
If ab = a
return "h"
If ab = p
return "j"
If ab = o
return "k"
If ab = i
return "l"
If ab = u
return "z"
If ab = y
return "x"
If ab = t
return "c"
If ab = r
return "v"
If ab = e
return "b"
If ab = w
return "n"
If ab = q
return "m"
If ab = 1
return 0
If ab = 2
return 9
If ab = 3
return 8
If ab = 4
return 7
If ab = 5
return 6
If ab = 6
return 5
If ab = 7
return 4
If ab = 8
return 3
If ab = 9
return 2
If ab = 0
return 1
if ab = %A_space%
return A_space
if ab = %A_tab%
return A_tab
} |
|
|
| Back to top |
|
 |
tpatel5
Joined: 27 Oct 2004 Posts: 65 Location: GA
|
Posted: Thu Aug 11, 2005 6:22 pm Post subject: |
|
|
Lol, I don't know if you realize this but you don't need any new script to decode , you can use the same sricpt to do both coding and decoding.
| Quote: | if ab = %A_space%
return A_space
if ab = %A_tab%
return A_tab |
I replaced this part of the function with
so anything beside those characters will remain same. For example, space, tab, ? $ & * . etc. _________________ -Tru  |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Aug 12, 2005 4:15 pm Post subject: |
|
|
You know i just relised that after i edited the whole script, but thanks anyway  |
|
| Back to top |
|
 |
mister
Joined: 13 Aug 2005 Posts: 1
|
Posted: Sat Aug 13, 2005 5:19 am Post subject: xbox joxstick |
|
|
i cant get the joystickmouse program to run
it says
{ error at line 152.
line text: (JoyPOV
error: this text contains an illegal character.
the program will exit} |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Aug 13, 2005 6:20 am Post subject: |
|
|
Hey mister,
maybe I've lost you here, but ... how is that related to the initial subject?
Hm, I've to correct myself. Because the intial subject line is useless/unspecific it could be that you thought we collect all help requests within a single thread!!!
AFAIK that's not the case. Go and create your own thread.
One problem, one thread. It's that simple. Thx.  |
|
| Back to top |
|
 |
another guest Guest
|
Posted: Sat Aug 13, 2005 8:40 pm Post subject: Help |
|
|
Hey i dont understand y my script dont work
Bassically im tryuing to get it 2 work for a program called winmx well here it is
#z:: Run WinMx
Sleep, 5000
MouseClickDrag, Left, 966, 137, 800, 185
Sleep, 1000
MouseClick, Left, 475, 100
I dont understand y the mouse dragging doesnt work
not sure y tho any suggestions |
|
| Back to top |
|
 |
tpatel5
Joined: 27 Oct 2004 Posts: 65 Location: GA
|
Posted: Sat Aug 13, 2005 11:07 pm Post subject: |
|
|
I don't blame "mister" or "another guest" as the title for this topic is very broad.
@Mister
Please start a new topic in the Ask for Help secition, and include that part of your script or maybe just that particular line
@another guest
may be mouseclickdrag is too fast for your active window, use speed option with to slow it down | Quote: | | MouseClickDrag, WhichButton, X1, Y1, X2, Y2 [, Speed, R] |
_________________ -Tru  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|