Jump to content

Recommended Posts

Posted (edited)

I'm write this code may help someone to using AutoIt and ChilkatSoftware via ActiveX DLL
UDF will be in TODO

 

For details watch this showcase video: 

 

 

And demo code:

;~ https://www.chilkatsoft.com/refdoc/xChilkatSshTunnelRef.html
;~ https://www.youtube.com/watch?v=5_iSdS05CKA
 
Global $SshHostname = "127.0.0.1"
Global $SshPort = 22, $SshListenPort = 1080
Global $SshUsername = "admin", $SshPassword = "admin"
 
Global $oChilkat = ObjCreate("Chilkat_9_5_0.SshTunnel")
If Not IsObj($oChilkat) Then
    Run("regsvr32 /s ChilkatAx-9.5.0-win32.dll")
    Exit
EndIf
 
With $oChilkat
    .TcpNoDelay = 1
    .VerboseLogging = True
    ConsoleWrite(".UnlockComponent" & @CRLF)
    If Not .UnlockComponent('ĐÉO CÓ KEY') Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
 
    ConsoleWrite(".Connect" & @CRLF)
    If Not .Connect($SshHostname, $SshPort) Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
 
    ConsoleWrite(".AuthenticatePw" & @CRLF)
    If Not .AuthenticatePw($SshUsername, $SshPassword) Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
 
    ConsoleWrite(".DynamicPortForwarding" & @CRLF)
    .DynamicPortForwarding = 1
    If Not .LastMethodSuccess Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
 
    .InboundSocksVersion = 5
 
    ConsoleWrite(".IsSshConnected" & @CRLF)
    If Not .IsSshConnected Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
 
    ConsoleWrite(".BeginAccepting" & @CRLF)
    If Not .BeginAccepting($SshListenPort) Then
        ConsoleWrite(.LastErrorText & @CRLF)
        Exit
    EndIf
EndWith
 
While True
    Sleep(50)
WEnd

 

Edited by WormIT
Posted

You can also Look for my chilkat example. 

In My signature . 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

We should try to write common UDF for Chilkat Component.

I'm using JSON.
You can see it here:

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Look in my QuickPDF UDF .
Concept of ObjCreate and ObjEventHandler should be used in the same way.

EDIT: If you want to write a common, coherent UDF for Chilkat I can help you by good advises, some rewrites, etc....
Just confirm you are interested in this development project.


 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 11/8/2016 at 4:09 PM, WormIT said:

Chilkat have a lot of method (imap, ssh, socket, ect..)

I will not write UDF for all of that.

Expand  

I know that chilkat have many object inside bundle component .
If you are currently interested only in ssh , so good.
Just do it properly + with possibilty to adapt other objects.

I can help as currently I'm interested in JSON object, so we can together develop it in parallel.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

If you want to start a new project open it here:
https://www.autoitscript.com/forum/forum/49-autoit-projects-and-collaboration/

 

Of course you can use for example github to sync changes but from time to time it could be nice to upload version here:
https://www.autoitscript.com/forum/files/

and if you plan to make it common for all chilkat object I propose especialy this:
https://www.autoitscript.com/forum/files/category/7-automation/

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...