Jump to content

Autoit data in VB.net


kcvinu
 Share

Recommended Posts

Hi all,

I am playing with this code. My aim is to get the data created by an autoit exe from vb.net. But i think this is not the safest method. Look at this code. And suggest me some better ideas.

This is my autoit code

#include <Clipboard.au3>

_ClipBoard_Open (Null)
_ClipBoard_Empty ( )
Local $s_path = "F:\MyFolder\Myfile.ini"
Local $s_val = IniRead($s_path,"Mysection","Mykey","def")
_ClipBoard_SetData($s_val, 1)
_ClipBoard_Close ( )

Exit

I have compile this autoit file as MyEXE.exe

And this is my vb.net code

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim text As String
    Process.Start("C:\Users\Vinod\Desktop\MyEXE.exe")
    text = Clipboard.GetText(TextDataFormat.Text)
    Label1.Text = text
End Sub

This is working, but if we copy something just before the button click, then we didn't get the proper value. So i am seeking any better ideas. 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Thank you @Danp2 . Let me read. 

Edit - At a first look, WM_COPYDATA seems interesting. :)

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@JohnOne , Yeah, i have got it. Planned to invest some time for further reading. Thanks. 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

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

×
×
  • Create New...