Jump to content

Send/ControlSend/ControlClick not working in my pc.


Go to solution Solved by FireFox,

Recommended Posts

I've tried this code, and some variants to get it working, and I'm stuck.

Opt("WinTitleMatchMode", 4)

Run("control sysdm.cpl,,3")
WinWaitActive("classname=#32770")
$handle = WinGetHandle("active")

ControlClick($handle,"","[CLASS:Button; INSTANCE:2]")

Tried clicking, controlclicking, sending enter, sending "!o"... and nothing seems to work in that pc.

I've tried in another pc and it works.

Please help.

Link to comment
Share on other sites

it opens "visual effects" tab in my pc. seems to work, if you wanted that.

edit: even in your first version, that was judged as being wrong

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

it opens "visual effects" tab in my pc. seems to work, if you wanted that.

That's exactly what i want, but dont work in mine... Tested in my Windows7 and Windows 8...

EDIT: #RequireAdmin, and suddenly it works.. I'm getting crazy on this one, could someone explain me why it does not work without requireadmin? does not make sense to me...

Edited by adrigalilea
Link to comment
Share on other sites

You need to debug the script and see where it fails :

Run("control sysdm.cpl,,3")
 
WinWaitActive("[CLASS:#32770]")
 
Local $hWnd = WinGetHandle("[active]")
ConsoleWrite("Title: " & WinGetTitle($hWnd) & @CrLf)
 
Local $iRet = ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:2]")
ConsoleWrite("Ret: " & $iRet & ", error code: " & @error & @CrLf)
Link to comment
Share on other sites

 

You need to debug the script and see where it fails :

Run("control sysdm.cpl,,3")
 
WinWaitActive("[CLASS:#32770]")
 
Local $hWnd = WinGetHandle("[active]")
ConsoleWrite("Title: " & WinGetTitle($hWnd) & @CrLf)
 
Local $iRet = ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:2]")
ConsoleWrite("Ret: " & $iRet & ", error code: " & @error & @CrLf)

Hi FireFox, i've readed a lot of your work, thank you for the help, sorry i've never played with consolewrite, but sounds like i should in near future  o:)

When i run it from scite:

Ret: 1, error code: 0 (everything fine i guess.)

And as i said in last post, it's working when i use #RequireAdmin. If i don't write requireadmin the script just ends without clicking the button... Why that happens?

Edited by adrigalilea
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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