Jump to content

vb code use in Autoit


chun914
 Share

Recommended Posts

have the following code in VB (excel), would like to know if it's possible to modify it and use in Autoit.

Set Txt = CreateObject("PCOMM.autECLPS")
    Set Clist = CreateObject("PCOMM.autECLConnlist")
    Set Oia = CreateObject("PCOMM.autECLOIA")
    Session = Sheets("RKDS").[A1].Value
    Txt.setconnectionbyname Session
    Oia.setconnectionbyname Session
.
.
.
.
.
.
Cells(2, 2).Value = Txt.GetText(20, 30, 1)

is it possible to modify it ?

Link to comment
Share on other sites

Something like this

$Txt = ObjCreate("PCOMM.autECLPS")
    $Clist = ObjCreate("PCOMM.autECLConnlist")
    $Oia = ObjCreate("PCOMM.autECLOIA")
    $Session = $Sheets("RKDS").[A1].Value
    $Txt.setconnectionbyname($Session)
    $Oia.setconnectionbyname($Session)
.
.
.
.
.
.
$Cells(2, 2).Value = $Txt.GetText(20, 30, 1)

There is a Vbs2Au3 converter in scripts'n'Scraps if searched.

btw, what does the square brackets do?

:)

Link to comment
Share on other sites

Something like this

$Txt = ObjCreate("PCOMM.autECLPS")
    $Clist = ObjCreate("PCOMM.autECLConnlist")
    $Oia = ObjCreate("PCOMM.autECLOIA")
    $Session = $Sheets("RKDS").[A1].Value
    $Txt.setconnectionbyname($Session)
    $Oia.setconnectionbyname($Session)
.
.
.
.
.
.
$Cells(2, 2).Value = $Txt.GetText(20, 30, 1)

There is a Vbs2Au3 converter in scripts'n'Scraps if searched.

btw, what does the square brackets do?

:)

You should be able to use it in AutoIt. Search for 'ObjCreate' in the help file. Read through the whole Obj/COM Reference section.

The square brackets appear to define a cell reference within Worksheet 'RKDS'.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

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