Using Perl, Python, or Ruby, how to write a program to “click” on the screen at scheduled time?

前端 未结 5 1614
眼角桃花
眼角桃花 2021-01-16 02:32

Using Perl, Python, or Ruby, can I write a program, probably calling Win32 API, to \"click\" on the screen at scheduled time, like every 1 hour?

Details:

5条回答
  •  醉话见心
    2021-01-16 03:12

    In Python there is ctypes and in Perl there is Win32::API

    ctypes Example

    from ctypes import *
    windll.user32.MessageBoxA(None, "Hey MessageBox", "ctypes", 0);
    

    Win32::Api Example

    use Win32::GUI qw( WM_CLOSE );
    my $tray = Win32::GUI::FindWindow("WindowISearchFor","WindowISearchFor");
    Win32::GUI::SendMessage($tray,WM_CLOSE,0,0);
    

提交回复
热议问题