• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do visual basic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do visual basic


  • Subject: Re: do visual basic
  • From: Andrew Oliver <email@hidden>
  • Date: Wed, 10 Mar 2004 09:08:56 -0800

There is no association between the variable named 'x' inside the Visual
Basic script and the variable named 'x' in the AppleScript.

I've never used VB scripting within AppleScript, but I would assume you can
assign the result of the VB Script to an AppleScript object to achieve what
you're after:

set x to Do Visual Basic"
dim x as string
x = 10
Return x
"

display dialog x

In this example the return value of the VB script is put into the
AppleScript variable x. The similar names are pure coincidence.

Andrew
:)

On 3/10/04 8:08 AM, "Giampiero Cairo" <email@hidden> wrote:

> Hi all,
>
> I use applescript and in particular the command "Do Visual Basic"
>
> I want to get a value of a variable from the routine of Visual basic to the
> rest of applescript code.
>
>
> this is my snippet of script:
>
>
> set myvar to ""
>
> Do Visual Basic "
> dim x as string
> x = 10
> Return x
> "
>
> repeat with x from 1 to 10
> set AnotherVar to x + 1
> end repeat
>
>
> Is it correct if I would pass the x value to the rest of my script for
> example to the "repeat cicle"?
>
>
>
> TIA
>
> Giampiero
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: do visual basic
      • From: Paul Berkowitz <email@hidden>
References: 
 >do visual basic (From: "Giampiero Cairo" <email@hidden>)

  • Prev by Date: New to AS... What am I doing wrong?
  • Next by Date: Re: Move and resize the window
  • Previous by thread: Re: do visual basic
  • Next by thread: Re: do visual basic
  • Index(es):
    • Date
    • Thread