Jump to content
Macro Express Forums

gagangoomer

Members
  • Posts

    88
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gagangoomer

  1. Thanks for the replying Samrae. I checked both the macro's mentioned above but couldn't get a menu with compulsory value. I was able to cancel the MCM without a value and even click the OK button w/t any value. Mentioned below is the script which i piced from this macro. // Multiple Choice Menu example Multiple Choice Menu: Windows Type If Variable %T[1]% Contains "A" Variable Set String %T[3]% to "2000" End If If Variable %T[1]% Contains "B" Variable Set String %T[3]% to "XP" End If If Variable %T[1]% Contains "C" Variable Set String %T[3]% to "Server 2003" End If If Variable %T[1]% Contains "D" Variable Set String %T[3]% to "Vista" End If If Variable %T[1]% Contains "E" Variable Set String %T[3]% to "Server 2008" End If If Variable %T[1]% Contains "F" Variable Set String %T[3]% to "7" End If If Variable %T[1]% Contains "G" Variable Set String %T[3]% to "Server 2012" End If If Variable %T[1]% Contains "H" Variable Set String %T[3]% to "8" End If If Variable %T[1]% Contains "I" Variable Set String %T[3]% to "Server 2012 R2" End If If Variable %T[1]% Contains "J" Variable Set String %T[3]% to "8.1" End If Text Box Display: Windows Type // -------------------------------------------------------- // Done // -------------------------------------------------------- Text Box Display: Sample Macro: %MacroName% Unlock Keyboard and Mouse
  2. Hi All, Wish you all a very Happy New Year Does anyone knows a way how to get a value from user in a MCM(Multiple Choice Menu) box. Till the time user doesn't select a value from the menu, the MCM box doesn't disappears. I've tried it for a input box and its working fine. But i'm not sure how to do it for a MCM box. Any Suggestions ? Gagan
  3. Thanks Cory !! Do you have any example of how to use registry instead to pass the variables ?
  4. The above script will return all the values which i've called in %Result% through Wscript.Echo command(i.e. caseid and fln). Does this means in order to print each value seperatly i need to capture each value in a different variable. Wscript.Echo caseid will be retured in %Result% Wscript.Echo fln will be retured in %Result1% or is there a way through which we can retreive all the values seperatly.
  5. Here's another Question on the board I've capture certain info by using object in IE and stored them in a External script (ES) variable. Dim IE Dim URLFound Dim ObjORS Dim fln Call Look_For_URL If URLFound = True Then IE.Visible = True fln = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_hypWandFLN").innerHTML Caseid = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML date = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML Status = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML Wscript.Echo fln Wscript.Echo Caseid End If Above script will return value in a variable %Result%. When i call %Result% it will show the values which i've called in script through Wscript.echo command. My question : Is there any way i can use the able values captured in another External script. I'm creating a new e-mail via ES option and want to pass the values retrieved from %Result%. 'Script from Body of the mail. strMsg = "Case id : " %Result% "FLN # " %Result% objMail.body = strMsg objMail.display
  6. Here's another Question on the board I've capture certain info by using object in IE and stored them in a External script (ES) variable. Dim IE Dim URLFound Dim ObjORS Dim fln Call Look_For_URL If URLFound = True Then IE.Visible = True fln = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_hypWandFLN").innerHTML Caseid = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML date = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML Status = IE.document.getElementById("ETSMaster_MainContentPlaceHolder_ETSHeader_pnlHeaderInfo_lblCaseID").innerHTML Wscript.Echo fln Wscript.Echo Caseid End If Above script will return value in a variable %Result%. When i call %Result% it will show the values which i've called in script through Wscript.echo command. My question : Is there any way i can use the able values captured in another External script. I'm creating a new e-mail via ES option and want to pass the values retrieved from %Result%. 'Script from Body of the mail. strMsg = "Case id : " %Result% objMail.body = strMsg objMail.display
  7. Thanks for Replying Cory & Samrae. Repeat Until %Choice% Equals "" Multiple Choice Menu: Make Your Choice End Repeat @Cory, I'm using the above simple code in for my macro. @ Samrae, I used your code but even after giving the input the macro doesn't stops. Seems like it gets into infinate loop til the user will press escape to get rid of it. The same code i used for the prompt command and it was working perfectly fine. I believe there must be a way by which we can use it for MCM as well. Another question which comes to my mind related to this. Can we execute another setup of code if the user clicks on the cancel button by over coming the default functionality of the button to Halt the macro ?
  8. Hi Everyone, Is there any way we can use the Repeat Until command to accept a value from user in a Multiple Choice Menu. Till the time user doesn't select any value( Single Choice or Multiple Choice) the MCM doesn't gets disappear. I tried Equal to / Doesn't Equal > 0 to option but it doesn't works. Thanks in advance ! Gagan
  9. Cory, I tested the above macro. When i run the macro it doesn't do anything but it seems like the macro is still running. As i noticed the moving man icon in the taskbar exits but i'm still getting option in ME to stop the macro(even after the macro is finished). I only get an option to pause the macro even stop button is not working. Not sure why it is acting so wierd. Ultimatelly i'd to shutdown ME to get rid of this issue. any thoughts ?
  10. Is there any command to check the current version of the software. I'm using shortcut keys in a macro to add some text in the header and footer part of MS Word. The shortcut keys differ in MS word 2003 version and MS word 2007+ version. I tried using the Get File Version command and specified the path of the Word Document but it returns 0:0:0:0. Not sure why it is not returing MS word 2003 or 2007 instead. Secondly is there any command to check the version fo the file through its title. Thanks for replying ! Gagan
  11. Cory, I've used the below code to check the mouse pointer. It moves the pointer to the progress bar area of the application and wait till the time the app gets the focused back from the server. Once it gets the focus back it execute the next set of code. The color code 14215660 is blue color. Mouse Move: 484, 729 Relative to Current Window Get Pixel Color from Beneath the Mouse into %N[1]% Repeat Until %N[1]% Equals "14215660" Mouse Move: 484, 729 Relative to Current Window Delay: 50 milliseconds End Repeat Any Suggestion ??
  12. I want to pass the value stored in ME variable (%test%) to External script variable. Clipboard copy cab be used only with ME and not with ES i guess ?
  13. Thanks for your response Cory. I got your point on conversion of value from MEP to External script. But my problem doesn't get resolve. Leme give you an idea about the complete situation. I'm not able to pass the value captured from IE app in a ME variable(%test%) to External script.
  14. I'm able to capture the value from an External script option and pass the value to another variable by using "Wscript.Echo %test%" command How can i pass the value captured in %test% via ME to another app. Here's a brief about the scnerio. 1) Input box to capture value from user (%test)% 2) Use External script (setup a connection to another app) and pass the value captured above to the connected app. I've tried the above command(Wscript.Echo %test%) but not getting results. Any suggestions ??
  15. Thanks a ton Cory...I never had a look at the color codes under the Mouse locator box.
  16. Cory, Thanks for your reply. I found a macro(umRGBColorEvaluator.mex). This macro tells you the color location of your mouse pointer. If you go through the script you'll find all the color combinations we can get through using RGB. When i run the macro it shows most of the time results as White color only. Also you mentioned for Black color the color combination would be 255,255,255 where as in the macro script it is mentioned as 0,0,0.Unluckely i don't have the option to send you the script so i've attached the snapshot for your reference. I tried to attach the snapshot of the script but the editor is not letting me to that as well.So i've mentioned the simple script for your reference. <GET PIXEL COLOR Option="\x01" Rel_To_Screen="TRUE" X="482" Y="749" Destination="%pixel_color%"/> <DELAY Flags="\x12" Time="300"/> <END IF/> <REPEAT START Start="1" Step="1" Count="200" Save="FALSE"/> <DELAY Flags="\x02" Time="100"/> <IF VARIABLE Variable="%pixel_color%" Condition="\x01" Value="255" IgnoreCase="FALSE"/> <BREAK/> <END IF/> <END REPEAT/> <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Color Matched\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Gagan
  17. I couldn't find this option under MEP. Can you please advise where exactly this option is available ?
  18. On double clicking this it simply opens up a box "Window Script Host Settings". I changed the settings Folder Option --> File types to open .vbs file with wscript.exe but still nothing happens. Any suggestions ?
  19. Yes, it opens with Notepad. I'm not sure how to runs it instead of opening it. Though i tried to find out the option under Folder Option --> File types and change the Open with Option. But Didn't get any success. Can you please guide me through how to Run it inseated opening it.
  20. Paul, I tried to run the .vbs file from CMD. Does it simply opens the .vbs file from the particular location or does it runs the file. In my case it just opened the file.
  21. Cory, I've found the code to activate a particular window through VBA. But when i put the code under external script and run it doesn't works. I know there are certain functions/ methods which vba supports but vb script doesn't. Through the below code you can activate a particular window. EX. In the below code it activate the window with urls as Google. It checks the string "Google" in the url and once it finds it maximize the window. Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Global Const SW_MAXIMIZE = 3 Global Const SW_SHOWMINIMIZED = 2 Global Const SW_SHOWNORMAL = 1 Sub getIE() Dim IE_Tab As SHDocVw.InternetExplorer Dim SH_Win As SHDocVw.ShellWindows Dim T_Str As String Set SH_Win = New SHDocVw.ShellWindows For Each IE_Tab In SH_Win T_Str = IE_Tab.LocationURL If InStr(T_Str, "Google") > 0 Then IE_Tab.Visible = True apiShowWindow IE_Tab.hwnd, SW_MAXIMIZE IE_Tab.Refresh Else ' do something End If Next Set IE_Tab = Nothing Set SH_Win = Nothing End Sub I'll appriciate if someonce can help me converting this script to work as VB script. Regards, Gagan
  22. Thanks Cory...That was a magical one liner If possible can you share some script to activate/focus on a particular window. I'm able to open a new windo and perform anything on it. But couldn't get code to activate a particular window. I tried using the Shell object and using AppActivate fuction but failed to get any results. Thanks a ton
×
×
  • Create New...