Jump to content

What's wrong with this script ?


Recommended Posts

When he is in paint, and he press: ctrl+v then there is not coming a picture...

Global $Paused
HotKeySet("{PRINTSCREEN}", "PrintScreen")

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func PrintScreen()
    Sleep(3000)
        $answer = MsgBox(4, "Print Screen Function", "Do you want to save your Photo ?")
    If $answer = 7 Then
        MsgBox(0, "Goodbye", "Okey, then not, speak you later !")
    EndIf
    Run("C:\Windows\System32\mspaint.exe")
    WinWait("naamloos - Paint")
    TrayTip("Paint", "Paint succesfull started !", 5)
    Sleep(2000)
    Send("{CTRLDOWN}")
    Sleep(250)
    Send("V")
    Sleep(250)
    Send("{CTRLUP}")
    Sleep(1250)
    Send("{CTRLDOWN}")
    Sleep(250)
    Send("S")
    Sleep(250)
    Send("{CTRLUP}")
    Sleep(250)
EndFunc
Link to comment
Share on other sites

Global $Paused
HotKeySet("{F9}", "PrintScreen")

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func PrintScreen()
    Send("{PRINTSCREEN}")
        $answer = MsgBox(4, "Print Screen Function", "Do you want to save your Photo ?")
    If $answer = 7 Then
        MsgBox(0, "Goodbye", "Okey, then not, speak you later !")
    EndIf
    Run("C:\Windows\System32\mspaint.exe")
    WinWaitActive("")
    TrayTip("Paint", "Paint succesfull started !", 5)
    Sleep(2000)
    Send("^v")
    Sleep(2000)
    Send("^s")
    Sleep(250)
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

Global $count = 0
HotKeySet("{PRINTSCREEN}", "PrintScreen")

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func PrintScreen()
    If MsgBox(4, "Print Screen Function", "Do you want to save your Photo ?") = 7 Then
        MsgBox(0, "Goodbye", "Okey, then not, speak you later !")
        Return
    EndIf
    HotKeySet("{PRINTSCREEN}")
    Send("{PRINTSCREEN}")
    TrayTip("Paint", "Paint started !", 5)
    Run("C:\Windows\System32\mspaint.exe")
    WinWait("untitled - Paint")
    If Not WinActive( "untitled - Paint" ) Then
        WinActivate( "untitled - Paint" )
    EndIf
    WinWaitActive( "untitled - Paint" )
    Sleep(300)
    If ControlSend( "untitled - Paint" , '' , 'Afx:1000000:81' , "{CTRLDOWN}v{CTRLUP}" ) = 1 Then
        $count += 1
        WinSetTitle( "untitled - Paint" , '' , "Picture_"&$count )
        TrayTip("Paint", "Done!", 5)
    Else
        TrayTip("Paint", "Error!", 3)
    EndIf
    HotKeySet("{PRINTSCREEN}", "PrintScreen")
EndFunc

Edit: lol ... I thought I was going to be the first one.

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

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...