Sign in to follow this  
Followers 0
Mikeman27294

Hide Scintilla Control from SciLexer UDF - Solved

2 posts in this topic

#1 ·  Posted (edited)

Hello everyone,

Right now, I am working on a script that requires me to destroy the SciLexer control in my GUI. Unfortunately, the UDF doesnt seem to have a destory function, and it doesnt even mention how to destroy it. I know that on the page, people mention hiding it, but they didnt say how, and there isnt a function to do this either.

Does anbody know how to hide, or preferably, destroy the SciLexer control?

Thanks.

SciLexer UDF Topic

EDIT

After taking a look at the Scintilla documentation, I have found that there is an ILexer object which can be used to "release", or destroy the lexer, but I dont know anything about objects, and I know that autoiIt is not object oriented. I also dont know whether this can be done with a DLL call (I dont know much about using DLL calls either, but I assume they call a specified function inside a DLL?).

Anway, I will not be able to write the code myself (Assuming it doesnt exist) without help, but does anybody have an idea how releasing the control may be acieved?

Thanks again.

SOLUTION

Have you tried using WinSetState($sci, "", @SW_HIDE) ?

Solution thanks to Kip (The person who originally wrote the UDF) via inbox. Thanks Kip. Edited by Mikeman27294

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Anyone know how? even something that hasnt been testedd? something typed up quickly? Please?

Solved. See top post.

Edited by Mikeman27294

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  
Followers 0

  • Similar Content

    • Aphotic
      By Aphotic
      Just wanted to share my functions for managing a GUI with lots of controls and many screens.
      I personally feel that it is very efficient and keeps line count to a minimum.
      And if it's not, I'll learn a better solution!
      Note: There are some conditional veriables such as $changes and $cont that are modified by the main loop in this particular script; they are meant as an example, please don't try too hard to understand why they're used.
      *Usage*
      This allows you to re-state a handful of buttons in one line when doing slight GUI changes:
      ToggleCTRL($GUI_DISABLE, $dALO, $dAAF, $dRLA) (A few buttons on a certain screen)
      ToggleCTRL($GUI_DISABLE, $dSAV, $dCAN) (Save/Cancel buttons)
      AND
      A single line solution to switching a GUI "screen":
      GuiMod("MAIN", $GUI_HIDE)
      GuiMod("DETAILS", $GUI_SHOW)
      GuiMod("PLANS", $GUI_HIDE)
      Another way I've used this to my advantage is as follows:
      Say a GUI has 3 or 4 main screens, and 3 or 4 "form" screens.
      When switching to a form screen, save the main screen that it was on to a variable; then once the user is done with the form, either submitting or cancelling, you can call the variable to revert back to the main screen it was on.
      Func _GuiMod($i, $tog, $act = True) Switch $i Case "MAIN" If $tog = $GUI_SHOW And $changes Then $changes = False ControlClick($GUI, "", $LOGfg) Else EndIf If $tog = $GUI_SHOW Then WinMove($GUI, "", Default, Default, 535, 445) _ToggleCTRL($tog, $TAB, $LOGfl, $LOGfc, $LOGfi, $LOGfg, $LOGta, $LOGvd) _ToggleCTRL($tog, $LOGtp, $LOGse) Case "DETAILS" If $tog = $GUI_SHOW Then WinMove($GUI, "", Default, Default, 535, 475) Local $cont = True If $tog = $GUI_SHOW And $act Then If Not UpdateDetails() Then $cont = False _GuiMod("MAIN", $GUI_SHOW) EndIf EndIf If $cont Then _ToggleCTRL($tog, $dUID, $dICU, $dACC, $dCOF, $dNAM, $dCO2, $dIPW, $dEMA, $dEDI, $dLOG, $dMOD) _ToggleCTRL($tog, $dUPD, $dINP, $dAPL, $dALO, $dAAF, $dPLL, $dLOL, $dAFL, $dSAV, $dCAN, $dRPL) _ToggleCTRL($tog, $dRLA, $dACT, $dAC2, $dRET, $dDEL, $dADD, $dMQC) EndIf Case "ADD-INPUT" _ToggleCTRL($tog, $nCOMi, $nCO2i, $nNAMi, $nNAMb, $nEMAi, $nPREc, $nACCc, $nICUi, $nADDi, $nNOTi) _ToggleCTRL($tog, $nAPLb, $nALOb, $nAAFb, $nPLAl, $nLOCl, $nAFFl, $nRPLb, $nRLAb, $nADDb, $nCLEb) Case "PLANS" If $tog <> $GUI_SHOW Or Not $changing Then If $act Then _ToggleCTRL($tog, $dMOD, $dLOG, $dUPD, $dDEL) _ToggleCTRL($tog, $dINP, $dAPL, $dALO, $dAAF, $dPLL, $dLOL, $dAFL, $dSAV, $dCAN, $dRPL, $dRLA) EndIf Case "CHANGE" _ToggleCTRL($tog, $dITL, $dITC, $dAML, $dAMC, $dSCB, $dCCB, $dEAB) If $tog = $GUI_SHOW Then GUICtrlSetState($dRET, $GUI_DISABLE) Else GUICtrlSetState($dRET, $GUI_ENABLE) EndIf Case "NEW" If $tog = $GUI_SHOW Then WinMove($GUI, "", Default, Default, 465, 475) _ToggleCTRL($tog, $TAB, $nCOMl, $nCOMi, $nCO2l, $nCO2i, $nNAMl, $nNAMi, $nEMAl, $nEMAi, $nPREl, $nPREc) _ToggleCTRL($tog, $nACCl, $nACCc, $nPAEb, $nICUl, $nICUi, $nADDi, $nAPLb, $nALOb, $nAAFb, $nPLAl, $nLOCl) _ToggleCTRL($tog, $nAFFl, $nRPLb, $nNOTl, $nNOTi, $nADDb, $nCLEb, $nLAST) Case "ACCESS" If $tog = $GUI_SHOW Then WinMove($GUI, "", Default, Default, 465, 330) _ToggleCTRL($tog, $ACCd1, $ACCd2, $TYPla, $TYPli, $TYPad, $TYPde, $TYPmu, $TYPmd, $ACCla, $ACCli) _ToggleCTRL($tog, $ACCde, $ACCmu, $ACCmd, $ACCdl, $ACCdi, $ACCal, $ACCai, $ACCaa, $taRET) Case "TPi" _ToggleCTRL($tog, $tpOPEb, $tpCREr, $tpLINr, $tpCO2i, $tpEMAi, $tpEMAl, $tpCREb, $tpCOPb, $tpCOPi, $tpCTOi, $tpCGOb) _ToggleCTRL($tog, $tpUFLi, $tpUFLb, $tpICUi, $tpPLAi, $tpLINb, $tpDLIb, $tpUFMi, $tpSCAl, $tpCFAr, $tpCBAr) Case "TPC" If $tog = $GUI_SHOW Then _GuiMod("TPL", $GUI_HIDE) _GuiMod("TPH", $GUI_HIDE) _GuiMod("TPD", $GUI_HIDE) EndIf _ToggleCTRL($tog, $tpCO2l, $tpCO2i, $tpCOPl, $tpCOPi, $tpCREb, $tpCOPb, $tpSEPl, $tpCTOl, $tpCTOi, $tpCGOb, $tpLAST) _ToggleCTRL($tog, $tpIDNl, $tpIDNi, $tpIDNn, $tpSCAl, $tpEMAi, $tpEMAl, $tpCFAr, $tpCBAr) Case "TPL" If $tog = $GUI_SHOW Then _GuiMod("TPC", $GUI_HIDE) _GuiMod("TPH", $GUI_HIDE) _GuiMod("TPD", $GUI_HIDE) EndIf _ToggleCTRL($tog, $tpUFLl, $tpUFLi, $tpUFLb, $tpICUl, $tpICUi, $tpPLAl, $tpPLAi, $tpLINb, $tpDLIb, $tpUFMl, $tpUFMi, $tpIMAb, $tpIMRb) Case "TPH" If $tog = $GUI_SHOW Then _GuiMod("TPC", $GUI_HIDE) _GuiMod("TPL", $GUI_HIDE) _GuiMod("TPD", $GUI_HIDE) EndIf _ToggleCTRL($tog, $tpUFLl, $tpUFLi, $tpUFLb, $tpUFMl, $tpUFMi, $tpCOCl, $tpCOCi, $tpCOGb) Case "TPD" If $tog = $GUI_SHOW Then _GuiMod("TPC", $GUI_HIDE) _GuiMod("TPL", $GUI_HIDE) _GuiMod("TPH", $GUI_HIDE) EndIf _ToggleCTRL($tog, $tpDIDl, $tpDIDi, $tpDIDb) EndSwitch EndFunc Func _ToggleCTRL($tog, $c0 = 0, $c1 = 0, $c2 = 0, $c3 = 0, $c4 = 0, $c5 = 0, $c6 = 0, $c7 = 0, $c8 = 0, $c9 = 0, $c10 = 0, $c11 = 0, $c12 = 0) For $i = 0 To @NumParams GUICtrlSetState(Eval("c" & $i), $tog) Next EndFunc  
    • prazetto
      By prazetto
      pending delete post
    • Darknightx37
      By Darknightx37
      Hay there i try to create a gui and delete them on my secound monitore when i was in a fullscreen application but i noticed that i got tabed out of the application every time i created a new gui
      how to fix that i get tabed out i already tryed with winsetontop("application", "", 1)
      thx
       
      --> @SW_SHOWNOACTIVATE
      sry im stupid
    • zxtnt09
      By zxtnt09
      Hi guys,
      i need to "hide" a process for "10 secounds " after show that up again ,
      my process is "CMD.exe" , i used " echo off " but it doesn't hide ( go minimized , etc ).
      i want to do that , something like that : 
      1 ) run > cmd.exe
      2 ) something write in cmd , like : ping google.com
      3 ) when (2) is running , i don't like it was show , i want hide that ( or minimize )
      4 ) back to show after "10 sec" 
      thanks, 
       
    • zxtnt09
      By zxtnt09
      Hi guys,
      i have problem with this : 


      #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUI() Func GUI() Global $MyForm = GUICreate("My GUI edit",500,300,100,100) GUISetState(@SW_SHOW) GUISetFont(12, 400, 0, "Tahoma") $Label1 = GUICtrlCreateLabel("Label 01 ",0, 0, 50 , 25 ) $Label1 = GUICtrlCreateLabel("Label 01 ",0, 50, 50 , 25 ) Global $BTN1 = GUICtrlCreateButton("BTN 1 ", 150, 0, 50, 25) Global $BTN2 = GUICtrlCreateButton("BTN 2", 150, 50, 50, 25) EndFunc ;Function Func Test1() If $BTN1 = True Then Local $Edit1 = GUICtrlCreateEdit("Edit 1", 0, 80, 200, 200) EndIf EndFunc Func Test2() If $BTN2 = True Then Local $Edit2 = GUICtrlCreateEdit("Edit 2", 200, 80, 200, 200) EndIf EndFunc While 1 Switch GUIGetMsg() Case $BTN1 If $BTN1 = True Then Test1 () EndIf Case $BTN2 If $BTN2 = True Then Test2 () EndIf Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd * i want to : after click on "$BTN 1" , "$Edit2" was hidden or 
      after click on "$BTN 2" , "$Edit1" was hidden.