Jump to content

Color code


Recommended Posts

Hay, I was wondering if anyone knows how to get scite into a gui, through object i would image, so the edit area(ie the code), is contained in my program to be save and to do whatever. I'm creating my own batching language for my program and i am setting up the scite properties for commands and variables and things,but i don't use object so i dont know how to get it work. Thanks for any help

Edit: sry i messed up the title, not about color code

~Dark

Edited by DarkNecromancer
Link to comment
Share on other sites

o thats easy i used the help file and modded it a lil so it looked nicer i didnt add in the thing that will chang the input box if u click home and back and stuff so yeah :-/

#include <GUIConstants.au3>
$oIE = ObjCreate("Shell.Explorer.2")
GuiCreate("WebExplorer V1.0", 1021, 707,(@DesktopWidth-1021)/2, (@DesktopHeight-707)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$Website = GUICtrlCreateInput("", 160, 8, 345, 21, -1, $WS_EX_CLIENTEDGE)
$GO = GUICtrlCreateButton("Go", 552, 0, 65, 33)
$GUI_Button_Back  = GUICtrlCreateButton("Back", -8, 0, 59, 41)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 48, 0, 49, 41)
$GUI_Button_Home = GUICtrlCreateButton("Home", 96, 0, 51, 41)
$GUIActiveX      = GUICtrlCreateObj   ( $oIE,     10, 100, 1010, 610)
GUISetState ()   ;Show GUI

$oIE.navigate("http://www.google.com")
HotKeySet("{enter}", "Go")
func Go()
    $oIE.Navigate(GUICtrlRead($website))
    endfunc$oIE.Navigate(GUICtrlRead($website))
; Waiting for user to close the window
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $GUI_Button_Home
            $oIE.navigate("http://www.google.com")
        Case $msg = $GUI_Button_Back
            $oIE.GoBack
        Case $msg = $GUI_Button_Forward
            $oIE.GoForward
        Case $msg = $GO
            $oIE.Navigate(GUICtrlRead($website))
        

    EndSelect
    
Wend

GUIDelete ()

Exit
Edited by thatsgreat2345
Link to comment
Share on other sites

sry i'm being unclear. I want to put a scite object in my program, but the problem i'm have is i don't know how to find the object code to do that. for example to make an IE object in the window you use that "Shell.Explorer.2" code, but i don't know the object code for the scrite program. could i do something like this?

$oSC = ObjCreate("C:\Program Files\AutoIt\Scite\Scite.exe")
?

~Dark

Link to comment
Share on other sites

I don't think you can do that since SCITE is doesn't have a com library. I don't think you can create objects with it. Only certain programs with com libraries can be embedded in another program. Programs that have these libraries include Autoit(known as AutoItX),windows media player, and internet explorer. Those are some of the ones I can name off the top of my head. I don't do much object oriented programming, but I don't think SCITE has a com library and therefore can't be embedded in another program.

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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