Jump to content

Script work on Win7 but dont work on WinXP


Pablik
 Share

Recommended Posts

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
Link to comment
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

Link to comment
Share on other sites

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
Link to comment
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
Link to comment
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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...