Can Windows API or DLL functions be run ?

Discuss RoboTask here
Post Reply
User avatar
robotask
Posts: 36
Joined: Thu May 02, 2013 11:19 am

Can Windows API or DLL functions be run ?

Post by robotask »

Does robotask support DLL calls or using Windows API ?
User avatar
robotask
Posts: 36
Joined: Thu May 02, 2013 11:19 am

Re: Can Windows API or DLL functions be run ?

Post by robotask »

for illustration purpose only, here is a DLL call from Automate 9 using windows API function(s) from user32.dll

<AMVARIABLE NAME="a"></AMVARIABLE>
<AMEXECUTEDLLFUNCTION DLLFILEPATH="C:\Windows\SysWOW64\user32.dll" METHODNAME="MessageBox" RETURNTYPE="Void"><ARGUMENT ARGTYPE="Int32" ARGVALUE="0" /><ARGUMENT ARGTYPE="String" ARGVALUE="Hi" /><ARGUMENT ARGTYPE="String" ARGVALUE="Bye" /><ARGUMENT ARGTYPE="Int32" ARGVALUE="0" /></AMEXECUTEDLLFUNCTION>
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Can Windows API or DLL functions be run ?

Post by Oleg »

You can use Basic script. See example below:

Code: Select all

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
  (ByVal hWnd As Long, ByVal lpOperation As String, _
  ByVal lpFile As String, ByVal lpParameters As String, _
  ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Declare  Function MyMsgBox Lib "User32.dll" Alias "MessageBox" _
   (ByVal hWnd As Integer, ByVal txt As String, ByVal caption As String, _
   ByVal typ As Integer ) As Integer

Sub Main

ShellExecute(0, "open", "notepad.exe", "", ".", 10)
MyMsgBox(0,"Notepad has been started", "Notification", 0)

End Sub
You can get basic Plugin for RoboTask here:
http://www.robotask.com/downloads/

Direct link:
http://www.robotask.com/downloads/BasicForRoboTask.exe
Oleg Yershov
Post Reply