Jump to content
Sign in to follow this  
Hypnotix

Loop Issue

Recommended Posts

Hypnotix

I am trying to make a script that draws a hud on top of my software when its active and then removes it when the window isnt active.

***some of the functions used aren't built in to autoit, but function fully fine in their normal purpose, its only under these conditions i reach a problem***

What i have is:

while 1
  If WinActive("Psycalc", "" ) Then
      Createhud()
 
  
  Else
 
      Removehud()
 
    endif
  
wend

So heres how it excutes this. I open up Psycalc and it draws my hud. I minimize Psycalc it deletes the hud (as intended) if i reopen it, it draws the hud again, BUT at this point it stops doing anything further. If i minimize again the hud stays, and nothing effects it besides closing the script. What is this loop missing to gain the consistency i need?

Share this post


Link to post
Share on other sites
PhoenixXL

can u show us the Removehud() and Createhud() Functions


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
Hypnotix

The create hud function is actually your unmodified hud creation (ended up sticking with it ;)) the remove hud is just GUIdelete(NAME). nothing that you dont already have. ill post um though

Func Createhud()
  $logo1=_JustTheText('WPM',@DesktopWidth/2+30,@DesktopHeight/2-25,0,0,1,500,500000,'Arial',16)
   $logo2=_JustTheText($counter,@DesktopWidth/2,@DesktopHeight/2,0,0,1,500)
GUiSetState(@SW_SHOWNOACTIVATE)
Endfunc  
Func Removehud()
   GUIDelete($logo1)
   GUIDelete($logo2)
endfunc
Edited by Hypnotix

Share this post


Link to post
Share on other sites
PhoenixXL

u can have a look that my function is not too small

and according to your loop

while 1
  If WinActive("Psycalc", "" ) Then
      Createhud()

 
  Else

      Removehud()

    endif
 
wend

the Createhud takes place many times

like if the window psycalc is active even for a second much number of GUI will be created one above the other

so at last $logo will have the handle of the last window

hope this helps you out

Regards

Phoenix XL


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
PhoenixXL

maybe u missed out the array part the guihandle is at array[0]

i have tried your code with notepad hope that this helps you out

code

Global $logo1='',$logo2=''
#include <Type Text.au3>
while 1
  If WinActive("[CLASS:Notepad]", "" ) And $logo1='' And $logo2='' Then
   MsgBox(0,"","Activated")
      Createhud()
  ElseIf Not WinActive("[CLASS:Notepad]", "" ) And $logo1<>'' And $logo2<>'' Then
   MsgBox(0,"","Unactivated")
      Removehud()
  Endif
wend
Func Createhud()
  $logo1=_JustTheText('WPMASASDASDASDASDASDASD',@DesktopWidth/2+30,@DesktopHeight/2-25,0,0,1,500)
   $logo2=_JustTheText('HeyaASDASDASDASDSADASD',@DesktopWidth/2,@DesktopHeight/2,0,0,1,500)
GUiSetState(@SW_SHOWNOACTIVATE)
Endfunc
Func Removehud()
   GUIDelete($logo1[0])
   GUIDelete($logo2[0])
   $logo2=''
   $logo1=''
endfunc

and one more thing my UDF activates the script that may cause the problem

replace the following code with my UDFi have modified them as per your needs

#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author:      Phoenix XL
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
;============================GLOBAL DECLARATIONS===================================================
Global Const $WS_POPUP = 0x80000000
Global Const $WS_EX_TOOLWINDOW = 0x00000080
Global Const $WS_EX_TOPMOST = 0x00000008
Global Const $WS_EX_LAYERED = 0x00080000
Global Const $GUI_WS_EX_PARENTDRAG = 0x00100000
Global Const $GUI_BKCOLOR_TRANSPARENT = -2
Global Const $GUI_DOCKALL = 0x0322
;============================GLOBAL DECLARATIONS===================================================
#Region -Example-
;Example just Remove THe Semi Colons......  :)
;$1=_JustTheText('H',@DesktopWidth/2+10,@DesktopHeight/2,0,1) ;U can Drag The H character.....
;$2=_JustTheText('E',@DesktopWidth/2+20,@DesktopHeight/2,0)
;$3=_JustTheText('Y',@DesktopWidth/2+30,@DesktopHeight/2,0)
;$4=_JustTheText('A',@DesktopWidth/2+40,@DesktopHeight/2,0)
;Local $x=0
;While $x<10
; Sleep(1000)
; $x+=1
;WEnd
;_EraseText($4[0])
;_EraseText($3[0])
;_EraseText($2[0])
;_EraseText($1[0])
#EndRegion -Example-

#Region -Public Functions-
;===============================================================================
;
; Function Name:    _JustTheText($iText,$iLeft=0,$iTop=0,$iReturn=1,$iTimeOut=3000,$iFade=1,$iFadeTimeout=2000,$iTextColor=255,$font='Arial',$iFontSize=14,$iWeight=400, $iAttribute=0)
; Description:    Types Text on the Present Gui
;
; Parameter(s):  $iText  - The Text U want To Display
;                  $iLeft    - The Left Coordinate Where U want Ur Text To Be
;                  $iTop  -The Top Coordinate Where U want Ur Text to be
;                  $iReturn
;                   | 1      - Will Type The Text and Erase It Upon TimeOut
;                   | 0      - Use to make the Text Permanent and erase it upon calling _EraseText()
;         Returns an Array with $Array[0]= Handle to the Gui (Required By _EraseText() )
;         $Array[1] = Handle To The Label
;    $sMovable
;     | 0 (Will Not Move){Default}
;     | 1 (Is Movable)
;    $iTimeOut - The Time(in Milliseconds) The Text Will Remain in its Normal Form
;    $iFade
;    |1(if u want the Text to Appear And Dissapear with Fade)       ;
;    |0(If u dont want the Text to Fade)
;    $iFadeTimeout - The Time The Text Will Take For Fading
;    $iTextColor  - The Color Of the Text
;    $font   - The Font Of the Text {See GUISetFont() for more Help}
;    $iFontSize  -The Size of the Font {See GUISetFont() for more Help}
;    $iWeight  -The Weight of the Font {See GUISetFont() for more Help}
;    $iAttribute  - THe Attribute of the Font {See GUISetFont() for more Help}
; Requirement(s):   AutoIt3 Beta
; Return Value(s):  On Success - Returns 1 if $iReturn=1
;                  On Failure -  Returns 0 if $iReturn=1
;    if $Return=0
;    Returns an Array with
;    $Array[0]= Handle to the Gui (Required By _EraseText() )
;    $Array[1] = Handle To The Label
;
; Author(s):        Phoenix XL
;
;===============================================================================
Func _JustTheText($iText,$iLeft=0,$iTop=0,$iReturn=1,$sMovable=0,$iTimeOut=3000,$iFade=1,$iFadeTimeout=2000,$iTextColor=255,$font='Arial',$iFontSize=14,$iWeight=400, $iAttribute=0,$iBk_Color=0xABCDEF)
Local $iLabel,$pos
;================Default and -1 Detector......
_DefaultAnalyser($iLeft,0)
_DefaultAnalyser($iTop,0)
_DefaultAnalyser($iReturn,1)
_DefaultAnalyser($sMovable,0)
_DefaultAnalyser($iTimeOut,3000)
_DefaultAnalyser($iFade,1)
_DefaultAnalyser($iFadeTimeout,2000)
_DefaultAnalyser($iTextColor,255)
_DefaultAnalyser($font,'Arial')
_DefaultAnalyser($iFontSize,14)
_DefaultAnalyser($iWeight,400)
_DefaultAnalyser($iAttribute,0)
_DefaultAnalyser($iBk_Color,0xABCDEF)
;================Default and -1 Detector......
Local $iGui=GUICreate('',-1,-1,$iLeft,$iTop,$WS_POPUP,BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_LAYERED))
GUISetBkColor($iBk_Color)
GUISetFont($iFontSize, $iWeight, $iAttribute, $font,$iGui)
WinSetTrans($iGui,'',0)
GUISetState(@SW_SHOWNOACTIVATE,$iGui)
Switch $sMovable
  Case 1
   $iLabel=GUICtrlCreateLabel($iText,0,0,-1,-1,-1,$GUI_WS_EX_PARENTDRAG)
  Case Else
   $iLabel=GUICtrlCreateLabel($iText,0,0)
EndSwitch
GUICtrlSetColor(-1, $iTextColor)
GUICtrlSetResizing(-1,$GUI_DOCKALL)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
_fade($iGui,0,255,256/($iFadeTimeout/10))
$pos=ControlGetPos($iGui,'',$iLabel)
WinMove($iGui,'',Default,Default,$pos[2],$pos[3],100)
Switch $iReturn
  Case 0
   Local $Return[2]
   $Return[0]=$iGui
   $Return[1]=$iLabel
   Return $Return
  Case 1
   Sleep($iTimeOut)
   _fade($iGui,255,0,-1*(256/($iFadeTimeout/10)))
   Return GUIDelete($iGui)
EndSwitch
EndFunc

;===============================================================================
;
; Function Name:    _EraseText($hWnd,$iFade=1,$iFadeTimeout=2000)
; Description:    Erases The Typed Text
;
; Parameter(s):  $hWnd   - The Handle of the GUI returned by JustTheText() function
;                  $iFade
;    |1(if u want the Text to Appear And Dissapear with Fade)       ;
;    |0(If u dont want the Text to Fade)
;                  $iTop  -The Top Coordinate Where U want Ur Text to be
;                  $iReturn
;                  | 1       - ToolbarWindow32, Win2000+
;                  | 0       - Use to make the Text Permanent and erase it upon calling _EraseText()
;        Returns an Array with $Array[0]= Handle to the Gui (Required By _EraseText() )
;        $Array[1] = Handle To The Label
;    $iFadeTimeout - The Time The Text Will Take For Fading
; Requirement(s):   AutoIt3 Beta
; Return Value(s):  On Success - Returns 1 if operation was successfull
;                  On Failure - If invalid parameters, returns -1
;
; Author(s):        PhoenixXL
;
;===============================================================================
Func _EraseText($hWnd,$iFade=1,$iFadeTimeout=2000)
;================Default and -1 Detector......
_DefaultAnalyser($iFade,1)
_DefaultAnalyser($iFadeTimeout,2000)
;================Default and -1 Detector......
If $iFade Then _fade($hWnd,255,0,-1*(256/($iFadeTimeout/10)))
Return GUIDelete($hWnd)
EndFunc
#Endregion -Public Functions-

;==========#INTERNAL FUNCTIONS=====================================================================
;Fades in and Out as per Required............
;Author: Phoenix XL
Func _fade($hWnd,$from=0,$to=255,$step=0.025,$Alpha= 0xABCDEF)
For $l=$from To $to Step $step
  _WinAPI_SetLayeredWindowAttributes($hWnd,$Alpha,$l)
  Sleep(10)
Next
If @error Then Return 1
Return 0
EndFunc
; #FUNCTION# ====================================================================================================================
; Name...........: _WinAPI_SetLayeredWindowAttributes
; Description ...: Sets Layered Window Attributes
; Syntax.........: _WinAPI_SetLayeredWindowAttributes($hWnd, $i_transcolor[, $Transparency = 255[, $dwFlags = 0x03[, $isColorRef = False]]])
; Parameters ....: $hwnd - Handle of GUI to work on
;                 $i_transcolor - Transparent color
;                 $Transparency - Set Transparancy of GUI
;      $dwFlags - Flags.
;                 $isColorRef - If True, $i_transcolor is a COLORREF( 0x00bbggrr ), else an RGB-Color
; Return values .: Success - 1
;                 @Error - 0
;                 |@error: 1 to 3 - Error from DllCall
;                 |@error: 4 - Function did not succeed - use _WinAPI_GetLastErrorMessage to get more information
; Author ........: Prog@ndy
; Modified.......:
; Remarks .......:
; Related .......: _WinAPI_GetLayeredWindowAttributes, _WinAPI_GetLastError
; Link ..........: @@MsdnLink@@ SetLayeredWindowAttributes
; Example .......: Yes
; ===============================================================================================================================
Func _WinAPI_SetLayeredWindowAttributes($hWnd, $i_transcolor, $Transparency = 255, $dwFlags = 0x03, $isColorRef = False)
If $dwFlags = Default Or $dwFlags = "" Or $dwFlags < 0 Then $dwFlags = 0x03
If Not $isColorRef Then
  $i_transcolor = Hex(String($i_transcolor), 6)
  $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
EndIf
Local $aResult = DllCall("user32.dll", "bool", "SetLayeredWindowAttributes", "hwnd", $hWnd, "dword", $i_transcolor, "byte", $Transparency, "dword", $dwFlags)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0]
EndFunc   ;==>_WinAPI_SetLayeredWindowAttributes
#cs
Name    _DefaultAnalyser()
Syntax: _DefaultAnalyser($sDefault,ByRef $sParameter)
Parameters:
      $sVariable(ByRef) :The Variable to Check/Compare
      $sDefault   :Pass the Default Value of the Varialble which has to be set When Default Keyword or -1 is used
Return Values:
     This Function Doesn't Return Anything
Remarks:    This Function Checks the Value of a Variable and Sets it to the Optional Value Whenever Default(keyword) or -1 is Detected.......
Example:   Check The Bottom Of The The Script
Author: Phoenix XL
#ce
Func _DefaultAnalyser(ByRef $sVariable,$sDefault)
;ConsoleWrite('Variable Value:'&$sVariable&@TAB&'Default Value:'&$sDefault&@CRLF)
Switch $sVariable
  Case Default,-1
   $sVariable=$sDefault
EndSwitch
EndFunc
;==========#INTERNAL FUNCTIONS=====================================================================

The create hud function is actually your unmodified hud creation (ended up sticking with it ;)) the remove hud is just GUIdelete(NAME). nothing that you dont already have. ill post um though

I will modify it this weekend :)

Regards

Phoenix XL

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
Hypnotix

for some reason it says Duplicate function name.:

Func _WinAPI_SetLayeredWindowAttributes($hWnd, $i_transcolor, $Transparency = 255, $dwFlags = 0x03, $isColorRef = False)

well i realized that scause i included the Winapi file. but when i remove that then i get the error ==> Can not redeclare a constant.:

Global Const $WS_POPUP = 0x80000000

Edited by Hypnotix

Share this post


Link to post
Share on other sites
PhoenixXL

Try This

#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author:   Phoenix XL
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
;============================GLOBAL DECLARATIONS===================================================
#include-once
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
;============================GLOBAL DECLARATIONS===================================================
#Region -Example-
;Example just Remove THe Semi Colons......  :)
;$1=_JustTheText('H',@DesktopWidth/2+10,@DesktopHeight/2,0,1) ;U can Drag The H character.....
;$2=_JustTheText('E',@DesktopWidth/2+20,@DesktopHeight/2,0)
;$3=_JustTheText('Y',@DesktopWidth/2+30,@DesktopHeight/2,0)
;$4=_JustTheText('A',@DesktopWidth/2+40,@DesktopHeight/2,0)
;Local $x=0
;While $x<10
; Sleep(1000)
; $x+=1
;WEnd
;_EraseText($4[0])
;_EraseText($3[0])
;_EraseText($2[0])
;_EraseText($1[0])
#EndRegion -Example-
#Region -Public Functions-
;===============================================================================
;
; Function Name:    _JustTheText($iText,$iLeft=0,$iTop=0,$iReturn=1,$iTimeOut=3000,$iFade=1,$iFadeTimeout=2000,$iTextColor=255,$font='Arial',$iFontSize=14,$iWeight=400, $iAttribute=0)
; Description:    Types Text on the Present Gui
;
; Parameter(s):  $iText  - The Text U want To Display
;                 $iLeft    - The Left Coordinate Where U want Ur Text To Be
;                 $iTop  -The Top Coordinate Where U want Ur Text to be
;                 $iReturn
;                  | 1    - Will Type The Text and Erase It Upon TimeOut
;                  | 0    - Use to make the Text Permanent and erase it upon calling _EraseText()
;        Returns an Array with $Array[0]= Handle to the Gui (Required By _EraseText() )
;        $Array[1] = Handle To The Label
;    $sMovable
;    | 0 (Will Not Move){Default}
;    | 1 (Is Movable)
;    $iTimeOut - The Time(in Milliseconds) The Text Will Remain in its Normal Form
;    $iFade
;    |1(if u want the Text to Appear And Dissapear with Fade)      ;
;    |0(If u dont want the Text to Fade)
;    $iFadeTimeout - The Time The Text Will Take For Fading
;    $iTextColor  - The Color Of the Text
;    $font   - The Font Of the Text {See GUISetFont() for more Help}
;    $iFontSize  -The Size of the Font {See GUISetFont() for more Help}
;    $iWeight  -The Weight of the Font {See GUISetFont() for more Help}
;    $iAttribute  - THe Attribute of the Font {See GUISetFont() for more Help}
; Requirement(s):   AutoIt3 Beta
; Return Value(s):  On Success - Returns 1 if $iReturn=1
;                 On Failure -  Returns 0 if $iReturn=1
;    if $Return=0
;    Returns an Array with
;    $Array[0]= Handle to the Gui (Required By _EraseText() )
;    $Array[1] = Handle To The Label
;
; Author(s):        Phoenix XL
;
;===============================================================================
Func _JustTheText($iText,$iLeft=0,$iTop=0,$iReturn=1,$sMovable=0,$iTimeOut=3000,$iFade=1,$iFadeTimeout=2000,$iTextColor=255,$font='Arial',$iFontSize=14,$iWeight=400, $iAttribute=0,$iBk_Color=0xABCDEF)
Local $iLabel,$pos
;================Default and -1 Detector......
_DefaultAnalyser($iLeft,0)
_DefaultAnalyser($iTop,0)
_DefaultAnalyser($iReturn,1)
_DefaultAnalyser($sMovable,0)
_DefaultAnalyser($iTimeOut,3000)
_DefaultAnalyser($iFade,1)
_DefaultAnalyser($iFadeTimeout,2000)
_DefaultAnalyser($iTextColor,255)
_DefaultAnalyser($font,'Arial')
_DefaultAnalyser($iFontSize,14)
_DefaultAnalyser($iWeight,400)
_DefaultAnalyser($iAttribute,0)
_DefaultAnalyser($iBk_Color,0xABCDEF)
;================Default and -1 Detector......
Local $iGui=GUICreate('',-1,-1,$iLeft,$iTop,$WS_POPUP,BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_LAYERED))
GUISetBkColor($iBk_Color)
GUISetFont($iFontSize, $iWeight, $iAttribute, $font,$iGui)
WinSetTrans($iGui,'',0)
GUISetState(@SW_SHOWNOACTIVATE,$iGui)
Switch $sMovable
  Case 1
   $iLabel=GUICtrlCreateLabel($iText,0,0,-1,-1,-1,$GUI_WS_EX_PARENTDRAG)
  Case Else
   $iLabel=GUICtrlCreateLabel($iText,0,0)
EndSwitch
GUICtrlSetColor(-1, $iTextColor)
GUICtrlSetResizing(-1,$GUI_DOCKALL)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
_fade($iGui,0,255,256/($iFadeTimeout/10))
$pos=ControlGetPos($iGui,'',$iLabel)
WinMove($iGui,'',Default,Default,$pos[2],$pos[3],100)
Switch $iReturn
  Case 0
   Local $Return[2]
   $Return[0]=$iGui
   $Return[1]=$iLabel
   Return $Return
  Case 1
   Sleep($iTimeOut)
   _fade($iGui,255,0,-1*(256/($iFadeTimeout/10)))
   Return GUIDelete($iGui)
EndSwitch
EndFunc
;===============================================================================
;
; Function Name:    _EraseText($hWnd,$iFade=1,$iFadeTimeout=2000)
; Description:    Erases The Typed Text
;
; Parameter(s):  $hWnd   - The Handle of the GUI returned by JustTheText() function
;                 $iFade
;    |1(if u want the Text to Appear And Dissapear with Fade)      ;
;    |0(If u dont want the Text to Fade)
;                 $iTop  -The Top Coordinate Where U want Ur Text to be
;                 $iReturn
;                 | 1      - ToolbarWindow32, Win2000+
;                 | 0      - Use to make the Text Permanent and erase it upon calling _EraseText()
;       Returns an Array with $Array[0]= Handle to the Gui (Required By _EraseText() )
;       $Array[1] = Handle To The Label
;    $iFadeTimeout - The Time The Text Will Take For Fading
; Requirement(s):   AutoIt3 Beta
; Return Value(s):  On Success - Returns 1 if operation was successfull
;                 On Failure - If invalid parameters, returns -1
;
; Author(s):        PhoenixXL
;
;===============================================================================
Func _EraseText($hWnd,$iFade=1,$iFadeTimeout=2000)
;================Default and -1 Detector......
_DefaultAnalyser($iFade,1)
_DefaultAnalyser($iFadeTimeout,2000)
;================Default and -1 Detector......
If $iFade Then _fade($hWnd,255,0,-1*(256/($iFadeTimeout/10)))
Return GUIDelete($hWnd)
EndFunc
#Endregion -Public Functions-
;==========#INTERNAL FUNCTIONS=====================================================================
;Fades in and Out as per Required............
;Author: Phoenix XL
Func _fade($hWnd,$from=0,$to=255,$step=0.025,$Alpha= 0xABCDEF)
For $l=$from To $to Step $step
  _WinAPI_SetLayeredWindowAttributes($hWnd,$Alpha,$l)
  Sleep(10)
Next
If @error Then Return 1
Return 0
EndFunc
#cs
Name    _DefaultAnalyser()
Syntax: _DefaultAnalyser($sDefault,ByRef $sParameter)
Parameters:
      $sVariable(ByRef) :The Variable to Check/Compare
      $sDefault   :Pass the Default Value of the Varialble which has to be set When Default Keyword or -1 is used
Return Values:
     This Function Doesn't Return Anything
Remarks:    This Function Checks the Value of a Variable and Sets it to the Optional Value Whenever Default(keyword) or -1 is Detected.......
Example:   Check The Bottom Of The The Script
Author: Phoenix XL
#ce
Func _DefaultAnalyser(ByRef $sVariable,$sDefault)
;ConsoleWrite('Variable Value:'&$sVariable&@TAB&'Default Value:'&$sDefault&@CRLF)
Switch $sVariable
  Case Default,-1
   $sVariable=$sDefault
EndSwitch
EndFunc
;==========#INTERNAL FUNCTIONS=====================================================================

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

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  

×