Results 1 to 6 of 6

Thread: 2 Big Questions......

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    8

    Exclamation 2 Big Questions......

    Hey, I come in search of answers for two burning questions on my tongue at the moment.
    The first, is , Can I change the classname of my projects forms ?
    Like, I would love to have my own classname, and not always be stuck with thunderforms etc.
    The second question, is, is it possible to have Declarations in VBScript addins in my program ?
    I hope someone can answer my two questions !
    Thanks
    -= c0ldfyr3 =-

  2. #2
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    The former question I cannot answer. I ain't good enough.

    The latter, however, I don't understand. Can you elaborate on that?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    8

    Exclamation Latter

    Ok, im using some VB Script in a VB app
    See, its an ocx that MS supply with Windows
    Its called msscript.ocx
    IT allows the execution of VB code from a string, like for example, a textbox or text file.
    Now, I want to know, is it possible for me to use Declarations and Constants in this method of running code or as i call it, my add-ins for my project
    -= c0ldfyr3 =-

  4. #4
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    Maybe I am missing the point completely, but to me it seems like you are asking "can I declare variables or constants in VB script?" -- is that what you are asking?

    I really hope someone will help out, as I feel kinda geeky here. I just don't understand what is the problem?

    Suggestion: post some short code example (working or otherwise) to illustrate what you are trying to achieve with your VBScript "plugin".

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    8

    Umm

    See the last post
    That ocx has a function
    .Execute "Code here"
    So lets say
    Control.Execute txtCode.text
    and txtCode.text = "msgbox ""hey"""
    That will make a msgbox sayin hey obvious
    Now, this also works
    txtcode.text would be

    Dim LoL
    LoL = InputBox("Sup","Sup")
    Msgbox LoL

    But, if i try and add a type to the declare it says expected end of statement, also, if i add a declare like

    Declare Function FindWindow........
    FindWindw(198902)


    It also says expected end of statement
    -= c0ldfyr3 =-

  6. #6
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    OK, slowly getting the picture. You want implement "macros" using VBScript -- not unlike MS Word, which lets the user write macros in VBA.

    OK, the reason that VBScript gives you an error on the Dim something As Something is probably that VBScript uses the Variant data type ONLY. You simply cannot dim somethin as integer. (I may be wrong, but even if I am, whatever variable dimmed as Integer will STILL be a Variant with subtype integer -- in other words; a Variant). Such is the nature of VBScript. Huge Fat time-consuming 16-byte Variant data types is the only available data type. Still, that's kinda cool for ASP and stuff like that.

    I think you might want to check out the WSH (Windows Scripting Host) OCX. Allegedly, there should be a Wsh.ocx or something like that included with newer versions of MSIE (version 5.0 and newer). I any case, I have not been very successfull with any of this, but you may have more luck than me.

    If I understand the Microsoft Developer's Network http://msdn.microsoft.com documentation right, there should be a way to "script"/control your app from .VBS files.

    I hope any of this makes sense. I'll get back to you if I find out more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width