Jump to content

Search the Community

Showing results for tags 'program control'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I have a general question. Is it possible to tell under program control when #RequireAdmin is needed? Specifically I can WinMove the Date and Time window without #RequireAdmin, however I cannot WinMove the System Properties window without using the #RequireAdmin. This script shows the issue. ;#RequireAdmin ;<-- makes A BIG difference #AutoIt3Wrapper_run_debug_mode=Y ; use this to debug in console window <--- LOOK Opt("WinTitleMatchMode", -2) ;nocase partial match okay ;MoveIt($pgm, $pgm_title) MoveIt("notepad.exe", "notepad") ;works MoveIt("cmd.exe", "cmd") ;works MoveIt("control timedate.cpl", "Date and Time") ;works MoveIt("systempropertiesprotection.exe", "System Properties") ;FAILS - handles correct, Winclose fails, etc. - actually hangs next run command - manually close window after MsgBox winclose pops up - then it will continue correctly MoveIt("control timedate.cpl", "Date and Time") ;works MoveIt("control sysdm.cpl", "System Properties") ;try old version - FAILS ALSO ;??? Is there some special approach needed to move a System Properties box ??? YES YES YES IT REQUIRES #RequireAdmin !!!!! Exit Func MoveIt($pgm, $pgm_title) Send("#r") ;open run box ;wait for it WinWait("Run") ;partial match If Not WinActive("Run") Then WinActivate("Run") WinWaitActive("Run") Send($pgm & @CRLF) ;run program WinWait($pgm_title) ;partial match If Not WinActive($pgm_title) Then WinActivate($pgm_title) WinWaitActive($pgm_title) MsgBox(0,"Debug","Ready to move.") $hl = WinMove($pgm_title, "", 0, 0) MsgBox(0,"Debug","Should be at 0,0 and handle = " & $hl & " (0=not found)") $hl = WinMove($pgm_title, "", 100, 100, Default, Default, 100) ;move slowly keep current size MsgBox(0,"Debug","Should be at 100,100 and handle = " & $hl & " (0=not found)") MsgBox(0,"Debug","Move completed.") $r = WinClose($pgm_title) ;be polite and close it MsgBox(0, "Debug", "WinClose return value = " & $r) EndFunc
×
×
  • Create New...