Leaderboard
Popular Content
Showing content with the highest reputation on 12/02/2018 in all areas
-
The GUI looks like shown in the picture: It contains a main menu, a treeview in left pane that lists UI Automation elements, a listview in right pane that displays detail information for the selected element, and a splitterbar to adjust the width of the two panes. Detect element The "Detect element" main menu is used to detect elements under the mouse with function keys F1 - F4. See How to topics number 2. Left pane The left pane is a treeview that initially lists open programs and windows. Generally, the left pane shows UI Automation elements represented as treeview items. Right pane The right pane is a listview that displays detail information for the selected treeview element. The information is grouped into different types of information. Only the relevant information for each type is displayed. Invalid elements When a window is closed the elements in UIASpy becomes invalid. But the elements are not deleted in UIASpy and can still be handled and selected in the treeview. Detail information for an element that was calculated before the window was closed can still be seen in the listview. In this way it's possible for UIASpy to show information for eg. a context menu that is closed as soon as it loses focus. Listview features Listview features Help system With completion of the Help system, a lot of information has been moved from this post and other posts into the Help system. Sample code creation Sample code creation is implemented through the UI element Detail info listview page and through the Sample code main menu. Sample code creates code snippets based on data in one or more selected rows in the Detail info listview page or based on the clicked Sample code menu item. UI Automation code is largely based on COM interface objects and thus on the function ObjCreateInterface(), which is one of the advanced functions in AutoIt. The main purpose of Sample code functionality is to eliminate the complexity of ObjCreateInterface(). Sample code creation either through the Detail info listview page or through the Sample code main menu can create all the interface objects required in UI Automation code. Another purpose is of course to make it easier and faster to implement code for simple automation tasks. Through Sample code creation, you can more or less create all code in a simple automation task: Create UI Automation initial code Create condition and find application window Create condition and find control in window Get information about windows and controls Create pattern objects to perform actions Get information related to pattern objects Perform actions with pattern object methods Add a Sleep() statement if necessary Note that the UI element used in sample code is named after the selected element in the treeview. Also note that both the Sample code menu items and the sections in the Detail info listview page are placed in approximately the order they are used in a simple automation task. Sample code creation through Detail info listview page Sample code creation through Sample code main menu Supported applications Most browsers including Google Chrome To be able to spy on web content in Google Chrome it's necessary to enable accessibility by entering chrome://accessibility/ in the address bar of a new tab item, and then check the five check boxes that are located in a column in upper left corner down along the left edge. Then the accessibility tab can be closed again. It's a global setting that applies to all open and new tabs until Chrome is closed. Without accessibility enabled you are only able to investigate the outer elements of Chrome but not web content. Internet Explorer Microsoft Edge Mozilla Firefox Most Microsoft applications and applications developed with Microsoft software including Classic Windows applications based on the standard control library Modern Universal Windows Platform apps like the Windows 10 Calculator Programs implemented through .NET Framework eg. Windows Forms applications Most applications provided by major development companies Automation issues Automation issues How to topics If UI Automation or the UIASpy tool is new to you, then you should read the How to topics. Examples Examples that demonstrates the features of UIASpy: Automating Notepad. Very detailed example. Automating Notepad - Windows XP Examples about Sample code creation: Automating Notepad with Sample code - step by step Automating Notepad with Sample code - all at once Chrome - Clicking an extension. Compact summary example. Click Save As... issue in Notepad examples: Using Expand() instead of Invoke() Updates Windows 8, Windows 8.1 and Windows 10 updates Threads UI Automation UDFs contains all include files. In Using UI Automation Code in AutoIt you can find and download examples and read information about using UIA code. UI Automation Events is about implementing event handlers and includes GUIs to detect events. IUIAutomation MS framework automate chrome, FF, IE, .... created by junkew August 2013 is the first AutoIt thread on UIA code. Zip-file The zip contains source files for UIASpy GUI. Note that UI Automation UDFs must be installed in the Includes folder. You need AutoIt 3.3.12 or later. Tested on Windows XP, Windows 7 and Windows 10. Comments are welcome. Let me know if there are any issues. UIASpy.7z2 points
-
Rapide, Just use _ArrayShuffle: #include <Array.au3> Global $aArray[9] For $i = 0 To 8 $aArray[$i] = $i + 1 Next _ArrayDisplay($aArray, "Loaded", Default, 8) _ArrayShuffle($aArray) _ArrayDisplay($aArray, "Shuffled", Default, 8) The well-known algorithm used for shuffling is as good as you can get. M232 points
-
Something a bit simpler $prev = '0' Msgbox(0,"", Execute(StringRegExpReplace('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', '(a)', _ "(Assign('s', StringReplace('123456789', $prev, '')) * Assign('a', StringSplit($s, '')[Random(1, StringLen($s), 1)]) * (Assign('prev', $a)) * $a) & ") & "''") )2 points
-
pretty much the same thing in a For loop instead of a while loop. Could probably also use a Do loop in a similar manner to the solution above if you wanted the practice. $min=1 $max=9 local $last , $out $EndStringLength = 5 For $i = 1 to $EndStringLength $n = Random($min,$max,1) If $n=$last Then $i -= 1 ContinueLoop EndIf $out &= $n $last = $n Next msgbox(0, '' , $out)2 points
-
RegExpQuickTester
pixelsearch reacted to mLipok for a file
Version 3.6
1,618 downloads
In April 5, 2013 I ask @Lazycat he answer: Then I change this tool a little. Now I back to this and make bigger changed. Here is new version. Update History: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 2018/11/07 v3.0 * Changed: AU3Check compilant - mLipok * Changed: almost all Variables renamed - mLipok * Added: "Delete RegExp Results" - mLipok * Added: support for dual monitor - mLipok * Added: "full screen mode" - mLipok = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 2018/11/08 v3.1 * Added: colors for each Edit control - used GUICtrlSetBkColor() - mLipok * Added: FullScreen option (Checkbox + INI + Remarks in Tip) - mLipok * Added: _IsChecked() - mLipok * Changed: WinMove() - change size of window using: WindowWidth and WindowHeight - mLipok = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 2018/11/13 v3.2 * Added: If $bFullScreen Then GUICtrlSetFont() - mLipok * Added: WM_COMMAND , $EN_CHANGE - prevent CPU overheat - mLipok = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 2018/11/29 v3.3 * Changed: $_g_idCheckbox_Clear - also clear $_g_idEdit_Result - mLipok * Changed: ClearResult If GUICtrlRead($_g_idEdit_MatchText) = '' Or GUICtrlRead($_g_idEdit_MatchText) = '' - mLipok * Fixed: prevention CPU overheat - If $iGuiMsg <> 0 Then $_g_bWasAChange = True - any GUI change will fire RegExp result refresh - mLipok * Fixed: Top possition of $_g_idLabel_Dummy control - mLipok * Added: support for TabSwitch - CTRL+TAB and CTRL+SHIFT+TAB - mLipok = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =1 point -
OnAutoItErrorRegister - Handle AutoIt critical errors
GoogleDude reacted to MrCreatoR for a topic
AutoIt Version: 3.3.10.2+ UDF Version: 2.0 Description: This library allows to register function for AutoIt critical errors. Usually it's syntax errors, or array-related errors. By default the UDF shows custom debug dialog, although it is not possible to perform any real debugging, but we can for example display the error message, restart application, send bug report, or just close the application. Example #1 - Displaying built-in dialog when error is received: #NoTrayIcon #AutoIt3Wrapper_Run_Before=%autoitdir%\AutoIt3.exe /AutoIt3ExecuteLine "FileClose(FileOpen('%scriptdir%\OAER_RAW_SRC.tmp', 2))" #AutoIt3Wrapper_Run_After=%autoitdir%\AutoIt3.exe /AutoIt3ExecuteLine "FileDelete('%scriptdir%\OAER_RAW_SRC.tmp')" #include <GUIConstantsEx.au3> #include 'OnAutoItErrorRegister.au3' _OnAutoItErrorRegister('', '', 'My App Error', False, False) GUICreate('OnAutoItErrorRegister Example', 350, 200) GUICtrlCreateLabel('This script is just an example.' & @CRLF & @CRLF & 'It will produce a syntax error in', 25, 40, 300, 50) GUICtrlCreateLabel('5', 185, 50, 50, 40) GUICtrlSetColor(-1, 0xF20000) GUICtrlSetFont(-1, 30, 800, 0, 'Tahoma') GUICtrlCreateLabel('seconds.', 220, 67, 300, 50) GUICtrlCreateLabel('The result shown as a CUSTOM error message, you can change it!', 25, 120, 350, 20) $iUnRegister_Bttn = GUICtrlCreateButton('UnRegister AutoItError handler', 25, 140, 200, 22) GUICtrlCreateLabel('Copyright jennico, G.Sandler (MrCreatoR) © 2008 - 2015', 25, 170, 350, 80) GUICtrlSetColor(-1, 0x808080) GUICtrlSetFont(-1, 8.5, 800, 6) GUISetState() Dim $iTimer For $i = 3 To 1 Step -1 GUICtrlSetData(4, $i) $iTimer = TimerInit() While TimerDiff($iTimer) < 1000 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $iUnRegister_Bttn _OnAutoItErrorUnRegister() EndSwitch WEnd Next ;We deliberately make a syntax mistake and call the error! If Random(1, 5, 1) = 3 Then MsgBox(0, '', ) Else _NotExistingFunc() EndIf Example #2 - Call user defined function when receiving error (script restart): #NoTrayIcon #AutoIt3Wrapper_Run_AU3Check=n ;!!! This must be used to ensure that raw source file is generated before compilation (because $bSetErrLine is True) #AutoIt3Wrapper_Run_Before=%autoitdir%\AutoIt3.exe "%in%" /BC_Strip #AutoIt3Wrapper_Run_After=%autoitdir%\AutoIt3.exe /AutoIt3ExecuteLine "FileDelete('%scriptdir%\OAER_RAW_SRC.tmp')" #pragma compile(Stripper, False) #include 'OnAutoItErrorRegister.au3' _OnAutoItErrorRegister('_MyErrorHandler', '', '', False, True) ;We deliberately make an array bounding error and call the error! Dim $aArr[1] MsgBox(0, '', $aArr[1]) Func _MyErrorHandler($sScriptPath, $iScriptLine, $sErrDesc, $vParams, $hBitmap) ;Restart the application Local $sMessage = StringFormat('SCRIPT FILE:\n%s\n\nSCRIPT ERROR LINE:\n%s\n\nERROR DESCRIPTION:\n%s', $sScriptPath, $iScriptLine, $sErrDesc) If StringInStr($CmdLineRaw, '/ErrorStdOut') Then If FileExists(@WindowsDir & "\Media\chord.wav") Then SoundPlay(@WindowsDir & "\Media\chord.wav") Else DllCall('user32.dll', 'int', 'MessageBeep', 'int', 0x00000010) EndIf EndIf If MsgBox(BitOR($MB_SYSTEMMODAL, $MB_YESNO), 'Crash recieved!', 'Restart application?' & @CRLF & @CRLF & $sMessage) <> 6 Then Return EndIf Local $sRunLine = @AutoItExe & ' "' & @ScriptFullPath & '"' If @Compiled Then $sRunLine = @ScriptFullPath EndIf Run($sRunLine, @ScriptDir) EndFunc Download: OnAutoItErrorRegister.zip (Counter: ) Screenshot: ChangeLog: Initial idea by jennico: Author(s): G.Sandler (MrCreatoR), jennico Notes: The UDF can not handle crashes that triggered by memory leaks, such as DllCall crashes, "Recursion level has been exceeded..." (when using hook method ($bUseStdOut = False)).When using StdOut method ($bUseStdOut = True), CUI not supported, and additional process executed to allow monitor for errors.After using _OnAutoItErrorUnRegister when $bUseStdOut = True, standard AutoIt error message will not be displayed on following syntax error.To use the "Send bug report" feature, there is need to fill related parameters (variables) under the «User Variables» section in UDF file (check the comments of these variables), or just build your own user function.[If $bSetErrLine is True...] Script must be executed before compilation (after any change in it), or use '#AutoIt3Wrapper_Run_Before=%autoitdir%\AutoIt3.exe "%in%" /BC_Strip' in your main script. Do NOT use Au3Stripper when compiling the main script if you want correct error line detection for compiled script. To get correct code line for compiled script, the script is transformed to raw source (merging includes) and FileInstall'ed when it's needed (on error), therefore, the script is available in temp dir for few moments (when error is triggered), although it's crypted, but developer should ensure that his script is more protected. [If $bSetErrLine is False...] Use supplied GetErrLineCode.au3 to get proper error line code by line number from error that was triggered in compiled script.1 point -
[solved] ToolbarWindow32 one button click
BlackLumiere reacted to Zedna for a topic
ControlCommand("", "", "ToolbarWindow321", "SendCommandID", "12345") ; ID=12345 And I think you should also specify title/text or window's handle to distinguish window1 point -
UIASpy - UI Automation Spy Tool
argumentum reacted to LarsJ for a topic
So far I've commented out that run-once check. But please do not start UIASpy more than once. It'll be a mess. New zip in first post. While I've developed this script I've primarily focused on the UI Automation code. That is, I've focused on detecting all UI elements correctly, inserting the elements into the treeview, and calculating and displaying detail information in the listview. And not at least optimized the code for performance and speed. Any issues with that part of the code? CUIAutomation2.au3 is copied directly from junkew's UI Automation thread. To be able to detect all elements in Windows 10 Start menu two new elements is added: Global Const $UIA_SemanticZoomControlTypeId=50039 Global Const $UIA_AppBarControlTypeId=50040 That's the reason for the update of the file. The red element rectangle and startup splash texts has got less attention. With regard to the red element rectangle, it's incredibly hard to draw without a little flicker. It's certainly not enough just to delete the old rectangle once and to draw the new rectangle once. This may easily end with a half-deleted old rectangle and a half-drawn new rectangle. If eg. the target window is restored from a minimized state, the Windows OS will do a lot of redrawing of the window. This may easily delete the red rectangle. You have to continue updating the rectangle until the redrawing of the window is finished. I would prefer not to write multiple thousand line code just to draw the red rectangle. And I think the focus on the UI Automation code is the proper focus for a script like this. It's a tool a developer can use while developing UI Automation code. So far, I'll only promise that I'll look at the problem that the red rectangle is not properly drawn on a high resolution display.1 point -
$min = 1 $max = 9 $prev = 0 $curr = Random($min, $max, 1) While(1) $curr = Random($min, $max, 1) If($curr <> $prev) Then ConsoleWrite($curr & " ") $prev = $curr EndIf WEnd Simplest, but I suggest you edit it.1 point
-
Here's one of many ways that it could be done. Example() Func Example() Const $kNUMBER_OF_DIGITS = 6 Local $iRandomDigit = 0 Local $sDigits = "" While StringLen($sDigits) < $kNUMBER_OF_DIGITS $iRandomDigit = Random(0, 9, 1) If StringRight($sDigits, 1) <> $iRandomDigit Then $sDigits &= String($iRandomDigit) WEnd ConsoleWrite(StringFormat("%s random digits: %s", $kNUMBER_OF_DIGITS, $sDigits) & @CRLF) EndFunc1 point
-
Hi Chimp, Yeah, now it works very fine. This is very handy and useful tool which makes automation a lot easier. Thank you very much for providing this and update.1 point
-
UDF for Title Case, Initial Caps, and Sentence Case
coffeeturtle reacted to tcurran for a topic
This UDF is intended to improve on the existing _StringProper UDF by using the magic of regular expressions (don't worry, it protects the user from having to know anything about RegEx). In addition to avoiding some of the anomalies associated with _StringProper (such as a cap following each apostrophe--Susan'S Farm), it provides additional functionality: Sentence Case: Only the first word of each sentence (following a period, question mark, exclamation point or colon) is capitalized.Title Case: Initial caps for all words except articles (a, the) and some common conjunctions (and, but) and prepositions (in, on). While the actual rules for capitalizing authored works would require hundreds of lines of code and still not be perfect, this will suffice for most uses.Capitalization Exceptions: Permits user selectable exceptions to the default scheme. Mac (as in MacDonald), Mc, and O' are the defaults, but users can pass their own exceptions in an easy-to-use function parameter.I've chosen not to use the term "Proper Case" in the function at all, because a) there are varying opinions about what it means, b ) my equivalent (termed "Initial Caps") works somewhat differently (i.e. better ), and c) "Proper Case" as used in other applications (e.g. Excel) works (or doesn't work) the same as _StringProper in AutoIt. I'm posting _StringChooseCase here in hopes of getting some feedback and squashing any bugs I've missed prior to submitting it as a candidate for inclusion as a standard AutoIt UDF. UPDATE (3 Jan 2013): I removed the hack noted below using a more bullet-proof method of marking capitalization exceptions, inspired by dany's _StringRegExpSplit function. Also added the colon character as sentence punctuation, and added II, III & IV as default cap exceptions. UPDATE (9 Jan 2013): The code is a hair more efficient. #include-once and #include <array.au3> now appear where they're supposed to. "I" is now always capitalized (both as the first person pronoun and the Roman numeral one). Title Case further improved: It now has a more comprehensive list of lower-case words--mainly more prepositions--and the last word of a title will always be capitalized. #include-once #include <Array.au3> ;_ArrayToString UDF used in Return ; #FUNCTION# ==================================================================================================================== ; Name...........: _StringChooseCase ; Description ...: Returns a string in the selected upper & lower case format: Initial Caps, Title Case, or Sentence Case ; Syntax.........: _StringChooseCase($sMixed, $iOption[, $sCapExcepts = "Mc^|Mac^|O'^|II|III|IV"]) ;PROSPECTIVE: add param for Ignore mixed case input ; Parameters ....: $sMixed - String to change capitalization of. ; $iOption - 1: Initial Caps: Capitalize Every Word; ; 2: Title Case: Use Standard Rules for the Capitalization of Work Titles; ; 3: Sentence Case: Capitalize as in a sentence. ; $sCapExcepts - [optional] Exceptions to capitalizing set by options, delimited by | character. Use the ^ ; character to cause the next input character (whatever it is) to be capitalized ; Return values .: Success - Returns the same string, capitalized as selected. ; Failure - "" ; Author ........: Tim Curran <tim at timcurran dot com> ; Remarks .......: Option 1 is similar to standard UDF _StringProper, but avoids anomalies like capital following an apostrophe ; Related .......: _StringProper, StringUpper, StringLower ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _StringChooseCase(ByRef $sMixed, $iOption, $sCapExcepts = "Mc^|Mac^|O'^|I|II|III|IV") Local $asSegments, $sTrimtoAlpha, $iCapPos = 1 $sMixed = StringLower($sMixed) Switch $iOption Case 1 ;Initial Caps $asSegments = StringRegExp($sMixed, ".*?(?:\s|\Z)", 3) ;break by word Case 2 ;Title Case $asSegments = StringRegExp($sMixed, ".*?(?:\s|\Z)", 3) ;break by word Case 3 ;Sentence Case $asSegments = StringRegExp($sMixed, ".*?(?:\.\W*|\?\W*|\!\W*|\:\W*|\Z)", 3) ;break by sentence EndSwitch Local $iLastWord = UBound($asSegments) - 2 For $iIndex = 0 to $iLastWord ;Capitalize the first letter of each element in array $sTrimtoAlpha = StringRegExp($asSegments[$iIndex], "\w.*", 1) If @error = 0 Then $iCapPos = StringInStr($asSegments[$iIndex], $sTrimtoAlpha[0]) If $iOption <> 2 Or $iIndex = 0 Then ;Follow non-cap rules for Title Case if option selected (including cap last word) $asSegments[$iIndex] = StringReplace($asSegments[$iIndex], $iCapPos, StringUpper(StringMid($asSegments[$iIndex], $iCapPos, 1))) ElseIf $iIndex = $iLastWord Or StringRegExp($asSegments[$iIndex], "\band\b|\bthe\b|\ba\b|\ban\b|\bbut\b|\bfor\b|\bor\b|\bin\b|\bon\b|\bfrom\b|\bto\b|\bby\b|\bover\b|\bof\b|\bto\b|\bwith\b|\bas\b|\bat\b", 0) = 0 Then $asSegments[$iIndex] = StringReplace($asSegments[$iIndex], $iCapPos, StringUpper(StringMid($asSegments[$iIndex], $iCapPos, 1))) EndIf ;Capitalization exceptions $asSegments[$iIndex] = _CapExcept($asSegments[$iIndex], $sCapExcepts) Next Return _ArrayToString($asSegments, "") EndFunc ;==> _StringChooseCase Func _CapExcept($sSource, $sExceptions) Local $sRegExaExcept, $iMakeUCPos Local $avExcept = StringSplit($sExceptions, "|") For $iIndex = 1 to $avExcept[0] $sRegExaExcept = "(?i)\b" & $avExcept[$iIndex] $iMakeUCPos = StringInStr($avExcept[$iIndex], "^") If $iMakeUCPos <> 0 Then $sRegExaExcept = StringReplace($sRegExaExcept, "^", "") Else $sRegExaExcept &= "\b" EndIf $avExcept[$iIndex] = StringReplace($avExcept[$iIndex], "^", "") ;remove ^ from replacement text $sSource = StringRegExpReplace($sSource, $sRegExaExcept, $avExcept[$iIndex]) If $iMakeUCPos <> 0 Then Local $iNextUC = _StringRegExpPos($sSource, $sRegExaExcept) Local $iMatches = @extended Local $iCapThis = $iNextUC + $iMakeUCPos For $x = 1 to $iMatches $sSource = StringLeft($sSource, $iCapThis - 2) & StringUpper(StringMid($sSource, $iCapThis - 1, 1)) & StringMid($sSource, $iCapThis) Next EndIf Next Return $sSource EndFunc ;==> _CapExcept Func _StringRegExpPos($sTest, $sPattern, $iOcc = 1, $iStart = 1) Local $sDelim, $iHits If $iStart > StringLen($sTest) Then Return SetError(1) ;Delimiter creation snippet by dany from his version of _StringRegExpSplit For $i = 1 To 31 $sDelim &= Chr($i) If Not StringInStr($sTest, $sDelim) Then ExitLoop If 32 = StringLen($sDelim) Then Return SetError(3, 0, 0) Next Local $aResults = StringRegExpReplace(StringMid($sTest, $iStart + (StringLen($sDelim) * ($iOcc - 1))), "(" & $sPattern & ")", $sDelim & "$1") If @error = 2 Then Return SetError(2, @extended, 0) $iHits = @extended If $iHits = 0 Then Return 0 If $iOcc > $iHits Then Return SetError(1) Local $iPos = StringInStr($aResults, $sDelim, 0, $iOcc) SetExtended($iHits) Return $iStart - 1 + $iPos EndFunc ;<== _StringRegExpPos Here's a bit of sample code: EDIT (16 Jan 2013): Corrected format of #include to use quotation marks instead of angle brackets. #Include "_StringChooseCase.au3" Global $test = "'abcdefghi now it's 'the time for all good men.' 'AND TWELVE MORE MACDONALD'S!'" & @CRLF & "The quick brown fox JUMPED over the lazy MacDonalds. The USA's Usain Bolt ran for the USA." ConsoleWrite(_StringChooseCase($test, 1, "Mc^|Mac^|O'^|USA|FBI|Barack|Obama") & @CRLF) ConsoleWrite(_StringChooseCase('"and the band played on"', 2) & @CRLF) Previous downloads: 18 _StringChooseCase.au31 point -
Nested Switch question
wolflake reacted to JohnQSmith for a topic
There is no issue with nested switch statements. You just need to use the correct syntax. You need to tell the switch command "what" you are wanting to switch. switch $A ; I want to check variable $A case "apple" ; does variable $A = "apple"? msgbox(0,"","","It's an apple") ; tell me it's an apple case "banana" ; does variable $A = "banana" msgbox(0,"","","It's a banana") ; tell me it's a banana case "car" ; does variable $A = "car" switch $B ; I want to check variable $B case "audi" ; does variable $B = "audi" msgbox(0,"","","Your car is an audi") ; tell me it's a car and an audi case "bmw" ; does variable $B = "bmw" msgbox(0,"","","Your car is a bmw") ; tell me it's a car and a bmw endswitch ; finish testing variable $B endswitch ; finish testing variable $A1 point