Sign in to follow this  
Followers 0
6329030

Script work on Win7 but dont work on WinXP

11 posts in this topic

#1 ·  Posted (edited)

Hello

I have poblem. My simple script :

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.6.1
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

WinActivate("R.O.H.A.N.")
Sleep(1000)
Send("{ENTER}")
Sleep(1000)
Send("D")
Sleep(1000)
Send("Z")
Sleep(1000)
Send("I")
Sleep(1000)
Send("A")
Sleep(1000)
Send("L")
Sleep(1000)
Send("A")
Sleep(1000)
Send("{ENTER}")
MsgBox(0,"","Koniec")

This script dont work in WinXP.

I have Win7 x64 and WinXP x32 , i compile to .exe x86 and he dont work on WinXP ;(

I install autoit on WinXP and run .au3 and he dont work ;(

Script on XP work corectli in windows but dont work in Game Window (I have game in WindowMode no FulScreen)

Script on Win7 work corectli in windows and in Game Window

WHY??? Somebody can help me ??

Sorry for my english ;P

Edited by 6329030

Share this post


Link to post
Share on other sites



well, for one, why do you have such a long sleep? and also, if you can you should use controlsend. pick up autoit window info, perhaps in windows xp said window is controlled differently

also, try winwaitactive after winactivate

Share this post


Link to post
Share on other sites

if winexists("R.O.H.A.N.", "") then
winactivate("R.O.H.A.N.", "")
winwaitactive("R.O.H.A.N.", "")
Sleep(1000)
Send("{ENTER}")
Sleep(1000)
Send("D")
Sleep(1000)
Send("Z")
Sleep(1000)
Send("I")
Sleep(1000)
Send("A")
Sleep(1000)
Send("L")
Sleep(1000)
Send("A")
Sleep(1000)
Send("{ENTER}")
MsgBox(0,"","Koniec")
endif

Share this post


Link to post
Share on other sites

you forgot to include the textfield in winactivate, which is basically the window text after the windowname, but this is unimportant if you have the wintitle, and thus should usually be kept as ""

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I use this script, and nothing change ;(

Window become active but next line script dont work ;(

My script on first post active window to :) but others donto work ;(

if winexists("R.O.H.A.N.", "") then
winactivate("R.O.H.A.N.", "")
winwaitactive("R.O.H.A.N.", "")
Sleep(1000)
Send("{ENTER}")
Sleep(1000)
Send("D")
Sleep(1000)
Send("Z")
Sleep(1000)
Send("I")
Sleep(1000)
Send("A")
Sleep(1000)
Send("L")
Sleep(1000)
Send("A")
Sleep(1000)
Send("{ENTER}")
MsgBox(0,"","Koniec")
endif

AutoIT v3 Window Info on XP

Summary

>>>> Window <<<<
Title:  R.O.H.A.N.
Class:  R.O.H.A.N.
Position:   135, 26
Size:   1030, 800
Style:  0x16CA0000
ExStyle:    0x00000100
Handle: 0x00080102

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 

>>>> Mouse <<<<
Position:   365, 598
Cursor ID:  0
Color:  0x000000

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
1
W
S
Q
E
A
D
NUMLOCK
J
I
O
P
B
K
N
F
G
T
L
C
M
H
INSERT
DELETE
1
2
3
4
5
6
7
8
9
0
SHIFT+1
SHIFT+2
SHIFT+3
SHIFT+4
SHIFT+5
SHIFT+6
F1
F2
F3
F4
F5
F6
ALT+G
ALT+P
ALT+A
ALT+S
ALT+L
SYSRQ
F12
Z
BACKSLASH
PAGE_UP
PAGE_DOWN
ALT+C
ALT+X


>>>> Hidden Text <<<<

AutoIT v3 Window Info on Win7

>>>> Window <<<<
Title:  R.O.H.A.N.
Class:  R.O.H.A.N.
Position:   340, 131
Size:   1030, 796
Style:  0x16CA0000
ExStyle:    0x00000100
Handle: 0x00000000003A0816

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 

>>>> Mouse <<<<
Position:   366, 771
Cursor ID:  0
Color:  0x766E6A

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
1
W
S
Q
E
A
D
NUMLOCK
J
I
O
P
B
K
N
F
G
T
L
C
M
H
INSERT
DELETE
1
2
3
4
5
6
7
8
9
0
SHIFT+1
SHIFT+2
SHIFT+3
SHIFT+4
SHIFT+5
SHIFT+6
F1
F2
F3
F4
F5
F6
ALT+G
ALT+P
ALT+A
ALT+S
ALT+L
SYSRQ
F12
Z
BACKSLASH
PAGE_UP
PAGE_DOWN
ALT+C
ALT+X


>>>> Hidden Text <<<<
Edited by 6329030

Share this post


Link to post
Share on other sites

Try it with ControlSend, as suggested before.

$wTitle = "[TITLE:R.O.H.A.N.; CLASS:R.O.H.A.N.]"

If WinExists($wTitle) Then
    WinActivate($wTitle)
    WinWaitActive($wTitle)
    Sleep(1000)
    ControlSend($wTitle, "", "", "{ENTER}")
    Sleep(1000)
    ControlSend($wTitle, "", "", "D")
    Sleep(1000)
    ControlSend($wTitle, "", "", "Z")
    Sleep(1000)
    ControlSend($wTitle, "", "", "I")
    Sleep(1000)
    ControlSend($wTitle, "", "", "A")
    Sleep(1000)
    ControlSend($wTitle, "", "", "L")
    Sleep(1000)
    ControlSend($wTitle, "", "", "A")
    Sleep(1000)
    ControlSend($wTitle, "", "", "{ENTER}")
    MsgBox(0, "", "Koniec")
EndIf

Share this post


Link to post
Share on other sites

Try it with ControlSend, as suggested before.

$wTitle = "[TITLE:R.O.H.A.N.; CLASS:R.O.H.A.N.]"

If WinExists($wTitle) Then
    WinActivate($wTitle)
    WinWaitActive($wTitle)
    Sleep(1000)
    ControlSend($wTitle, "", "", "{ENTER}")
    Sleep(1000)
    ControlSend($wTitle, "", "", "D")
    Sleep(1000)
    ControlSend($wTitle, "", "", "Z")
    Sleep(1000)
    ControlSend($wTitle, "", "", "I")
    Sleep(1000)
    ControlSend($wTitle, "", "", "A")
    Sleep(1000)
    ControlSend($wTitle, "", "", "L")
    Sleep(1000)
    ControlSend($wTitle, "", "", "A")
    Sleep(1000)
    ControlSend($wTitle, "", "", "{ENTER}")
    MsgBox(0, "", "Koniec")
EndIf

Not work ;( . It's the same as before

Share this post


Link to post
Share on other sites

Then Why my script work on Win7 x64 ??

Share this post


Link to post
Share on other sites

Then Why my script work on Win7 x64 ??

You think there is a connection with that and forum announcement?

If you do then how can it be expected to work? (This one is rhetorical)

Go away.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0