Jump to content
Sign in to follow this  
Gerome

Translating AuToIt code to FBSL

Recommended Posts

Gerome

Hello,

Here's some AutoIT code :

Func _IECreateEmbedded()
    
    Local $o_object = ObjCreate("Shell.Explorer.2")
    
    If Not IsObj($o_object) Then
        __IEErrorNotify("Error", "_IECreateEmbedded", "", "WebBrowser Object Creation Failed")
        SetError($_IEStatus_GeneralError)
        Return 0
    EndIf
;
    SetError($_IEStatus_Success)
    Return $o_object
EndFunc  ;==>_IECreateEmbedded

Here's same code ported to FBSL :

Function IECreateEmbedded_()
    Dim o_object = CreateObject("Shell.Explorer.2")
    
    If Not o_object Then
        MsgBox(Null, "IECreateEmbedded_", "WebBrowser Object Creation Failed", MB_IConstop)
        SetLastError(IEStatus_GeneralError_)
        Return 0
    End If
    SetLastError(IEStatus_Success_)
    Return o_object
End Function '//==>_IECreateEmbedded

Like AutoIt, FBSL is also capable of many interesting things :whistle:

Enjoy !


Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Share this post


Link to post
Share on other sites
jvanegmond

The FBSL forums are a funny thing. There seems to be a community there, but it kind of gets lost because some 'Jerome' replies to every thread he can find. Makes you think he always wants to have the last word.

I'm not leaving AutoIt anyway, but nice try :whistle:

Edited by Manadar

Share this post


Link to post
Share on other sites
Gerome

Hello,

The FBSL forums are a funny thing. There seems to be a community there, but it kind of gets lost because some 'Jerome' replies to every thread he can find. Makes you think he always wants to have the last word.

I'm not 'Jerome', but 'Gerome' if you would mind please :)

What about 'the last word' ?

I just want to share my knowledge, AND may i can recall you that it's thanks to FBSL that AutoIT has its DllCall thing, i've shared and gave MY asm code for it, so there is no offense to say hello here with code...

I'm not leaving AutoIt anyway, but nice try :)

The purpose was/is NOT to leave A for F, I feel sorry if you have had sucha feeling... :whistle:


Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Share this post


Link to post
Share on other sites
MHz

The purpose was/is NOT to leave A for F, I feel sorry if you have had sucha feeling... :whistle:

I try to keep an open view about using any programming language.

It is comforting to see a simlar syntax with the function shown with FBSL as compared to AutoIt's. This would make a switch from AutoIt to FBSL easier depending of the need of which to use for whatever purpose suits.

Thanks for the example code Gerome :)

Share this post


Link to post
Share on other sites
Gerome

Hello,

I try to keep an open view about using any programming language.

It is comforting to see a simlar syntax with the function shown with FBSL as compared to AutoIt's. This would make a switch from AutoIt to FBSL easier depending of the need of which to use for whatever purpose suits.

I try to do the same as you, keeping an eye opened to the newest technologies to enhance my work and to give me newest ideas.

Thanks for the example code Gerome :whistle:

Thanks!

You're welcome :)


Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Share this post


Link to post
Share on other sites
SmOke_N

Wow, that is really close!! Thanks Gerome.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Gerome

Hi,

Wow, that is really close!! Thanks Gerome.

Apart $ that is also reserved for telling the variable is a $string, and the _underscore that cannot be prepended in Fbsl, but postpended if you want, some scripts can easily copied/pasted from each to other with minor modifications :whistle:

This can be handy to compare speed between them ^^


Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster...

Share this post


Link to post
Share on other sites
Lakes

Hi,

Apart $ that is also reserved for telling the variable is a $string, and the _underscore that cannot be prepended in Fbsl, but postpended if you want, some scripts can easily copied/pasted from each to other with minor modifications :whistle:

This can be handy to compare speed between them ^^

Erm, should`nt discussions of other programming languages be in the General Forum?


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
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
Sign in to follow this  

×