Jump to content

pluginrecorder like a macrorecorder


BennyB
 Share

Recommended Posts

First of all excuse my english I'm writing, because it's not my foren language.

I have written some vbscript to install programs.

It is very hard to script this files for each program. Because of this I would like to make myself an install-recorder which records the keys and window titles while i install the program. If i can get this information i can generate the vbscript file.

Example vbscript file:

'1129795714

Option Explicit
Dim oShell
Dim oAutoIt
Dim Pfad

Set oShell = WScript.CreateObject("WScript.Shell")

Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

Pfad = WSCript.Arguments(0)

oAutoIt.WinWait "IrfanView Setup","Willkommen zur IrfanView Installation!"
oAutoIt.WinActivate "IrfanView Setup","Willkommen zur IrfanView Installation!"
oAutoIt.Sleep(50)
oAutoIt.Send Pfad
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Setup","Was ist neu in dieser Version?"
oAutoIt.WinActivate "IrfanView Setup","Was ist neu in dieser Version?"
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Setup","Alle markieren"
oAutoIt.WinActivate "IrfanView Setup","Alle markieren"
oAutoIt.Send "{ENTER}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Setup","Google Toolbar und Google Desktop"
oAutoIt.WinActivate "IrfanView Setup","Google Toolbar und Google Desktop"
oAutoIt.Send "{SPACE}"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{SPACE}"
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Setup","Bereit zum Installieren!"
oAutoIt.WinActivate "IrfanView Setup","Bereit zum Installieren!"
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Installation","Sie möchten die aktuellen Verknüpfungen ändern"
oAutoIt.WinActivate "IrfanView Installation","Sie möchten die aktuellen Verknüpfungen ändern"
oAutoIt.Send "{TAB}"
oAutoIt.Send "{ENTER}"
oAutoIt.WinWait "IrfanView Setup","Einrichtung abgeschlossen!"
oAutoIt.WinActivate "IrfanView Setup","Einrichtung abgeschlossen!"
oAutoIt.Send "{SPACE}"
oAutoIt.Send "{DOWN}"
oAutoIt.Send "{SPACE}"
oAutoIt.Send "{ENTER}"

WScript.Quit

I hope anybody understood my problem and can give me some hints and tips.

thank you for your interest

Benny

Edited by BennyB
Link to comment
Share on other sites

OK, I've found something that seems to be the right thing, but if i compiled the script and would like to start following error accured:

$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)

$aR = ^ERROR

a part of my code looks like:

Func _IsPressed($hexKey)

Local $aR, $bRv
$hexKey = '0x' & $hexKey
$aR = DllCall($user32", "int", "GetAsyncKeyState", "int", $hexKey)

If $aR[0] <> 0 Then
    $bRv = 1
Else
    $bRv = 0
EndIf


Opt("OnExitFunc","Terminate")
$user32 = DllOpen ( "user32" )

Has anybody an idea?

Link to comment
Share on other sites

OK, I've found something that seems to be the right thing, but if i compiled the script and would like to start following error accured:

$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)

$aR = ^ERROR

a part of my code looks like:

Func _IsPressed($hexKey)

Local $aR, $bRv
$hexKey = '0x' & $hexKey
$aR = DllCall($user32", "int", "GetAsyncKeyState", "int", $hexKey)

If $aR[0] <> 0 Then
    $bRv = 1
Else
    $bRv = 0
EndIf


Opt("OnExitFunc","Terminate")
$user32 = DllOpen ( "user32" )

Has anybody an idea?

Update your AutoIt

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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