Jump to content

Include visual basic code


Recommended Posts

Hello,

how can i include visual basic code in an autoit3 script.

So far i just compiled the autoit program and the vb program and started the vb program from the autoit program when its needed. but that causes trouble.

if this is not possible, how can i make autoit turn off the monitor or make it black for some time.

and is there any way to do this batch command with autoit: "anyprogram.exe>hi.txt"

the batch program reads all the text in the exe file and copies it to the txt file.

thanks alot

Link to comment
Share on other sites

if this is not possible, how can i make autoit turn off the monitor or make it black for some time.

Opt('WinTitleMatchMode', 4)
$hwnd = WinGetHandle('classname=Progman')
DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', 2)
Sleep(5000)
Send ("{Up}")

and is there any way to do this batch command with autoit: "anyprogram.exe>hi.txt"

RunWait(@ComSpec & " /c ipconfig /all > c:\ipaddress.log")
Edited by igmeou
[font="Arial"]Thanks[/font]
If @error = me Then $sorry
Else
   Do
      $clarifyMe
   Until $meClear
EndIF
MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)
Link to comment
Share on other sites

You just cant try run or include a VB Script with AutoIt, they are 2 totally different languages (AutoIt isnt really). You will have to "convert" the VB Script into AutoIt and emulate the outcome.

Do what igmeou has done, but you need to understand it. Read the Help file and look up what each function does and how to use it.

May your AutoIt scripting experience begin :).

Edited by Burrup

qq

Link to comment
Share on other sites

Well,

i kind of understand it but have i have to look through it again.

I know that you cant combine two different languages, i was thinking about something that makes it work, like a command to show the autoit compiler "hey, this is vbscript now" and it compiles it as vb script, that would work and you could combine the two languages, or cant that work?

maybe a new idea for the next autoit version.

thanks alot anyway

Link to comment
Share on other sites

Maybe you should have listend to quaizzywabbit... Try the AutoItX, that's what it's there for... It let's you use AutoIt in other languages... Pretty neat, huh? And no, you cannot just tell the compiler, "hey this is vb code now" and have it compile vb code... There is a BIN file to compile AutoIt scripts, so it's like preset to AutoIt code...

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