Jump to content

Recommended Posts

Posted

This is really starting to annoy me. I wrote this program once before but lost it so I tried again and now i cant get the Control send to work for some reason.

When it its the ControlSend line @error is set to 0, meaning window/control was not found

Well I have no control to send it to and i have tried just using, Zero and just empty "" to see if it works and it still doesn't

The WinActivate works so I'm assuming that it is finding the window ok just not a control. But I don't know what to do for a control since there is none. There is no ControlId or ClassNameNN so I am out of ideas and sadly I forget how i did it last time.

Thanks for any help.

Window Info:

There is no visible or hidden text

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  C:\ItemLevel.exe
Class:  ConsoleWindowClass
Size:   X: 4    Y: 2    W: 669  H: 338

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 309  Y: 283
Cursor ID:  15

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x000000   Dec: 0

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:
Control ID:
ClassNameNN:
Text:

HotKeySet("{SPACE}", "Enter")


WinActivate("C:\ItemLevel.exe")
$Hnd= WinGetHandle("C:\ItemLevel.exe")
ConsoleWrite($Hnd& @CRLF)
While 1
    Sleep(4000)
WEnd

Func Enter()
    ControlSend($Hnd,"", 0 ,"{ENTER}")
    ConsoleWrite(@error & @CRLF)
EndFunc
Posted

Shouldnt it be

ControlSend("C:\ItemLevel.exe","",$Hnd,"{ENTER}")

?!?

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted (edited)

if you can put that itemlevel.exe on rapidshare maybe we can figure something out

Edited by C2C

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted

ControlSend($Hnd,"", 0 ,"{ENTER}")
Are you sure the control-id is zero?? If you don't know you should send to "" like:

ControlSend($Hnd,"", "" ,"{ENTER}")

Shouldnt it be

ControlSend("C:\ItemLevel.exe","",$Hnd,"{ENTER}")

?!?

WTF?? You need some glasses or english-lessons.... :D
Posted (edited)

ControlSend("C:\ItemLevel.exe","", "" ,"{ENTER}")

ControlSend ( "title", "text", controlID, "string" [, flag] )

Try that

Edited by flip209

" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Posted

but the OP said

Well I have no control to send it to and i have tried just using, Zero and just empty "" to see if it works and it still

Im quite confused right about now

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted

Huh?

" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Posted

HotKeySet("{SPACE}", "Enter")

WinActivate(@ScriptDir & "\ItemLevel.exe")

$Hnd= WinGetHandle(@ScriptDir & "\ItemLevel.exe")

ConsoleWrite($Hnd& @CRLF)

While 1

Sleep(4000)

WEnd

Func Enter()

ControlSend($Hnd,"","","{ENTER}")

ConsoleWrite(@error & @CRLF)

EndFunc

seems to work but i dont have Diablo installed so it reports no handle of diable window

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted (edited)

When you are testing it do you have the window active? because for some reason even though it sets @error to 0 it still sends Enter to the active window

Edited by narayanjr
Posted (edited)

I have the itemlevel.exe minimized yes

though i put the script and the exe in the same directory

Edited by C2C

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted (edited)

sends enter to handle of your exe without the text or the command id

EDIT: Is it working or not?

Edited by C2C

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted

I dont see how. The script i pasted is very similar to yours and works just fine

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Posted (edited)

I dont know why it would, but is it possible it has something to do with my computer or something?

I'm using

Windows Xp Home SP2

Im on an Acct with Admin access

and now I am really confused, I just tested ControlSend with Notepad, and it works, but I still get @error = 0

Edit: but i had to use a control ID for it to work with notepad just leaving it blank didnt work

Edited by narayanjr

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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