SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Location
    Seoul, Korea
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    About missing letters and popup menu handling

    Hi, everyone~
    I need a help from you experts.
    I'm not sure whether I can explain about my problem because of my English ability. (Please be patient..)
    Anyway, here are my questions..

    1. I made a script to type letters into text field. Here is my script.

    Sys.Process("Explorer").Window("ExploreWClass", "*").Window("WorkerW", "", 1).Window("ReBarWindow32").Window("ComboBoxEx32"). Window("ComboBox").Window("Edit").Keys("e:\\tcdata \\alzip\\format[Enter]");

    This worked well usually but sometimes missed first letter 'e'. So, couldn't find correct path. Is there any problem with my script? If this is just a bug in TC, how can I solve this problem?


    2. I want to find a certain menu in popup and made below script(to store all menu in popup).

    shellMenu[1] = new Array();
    w2.ClickItemR("CheckContextMenu.zip", 0);
    count = w2.PopupMenu.Count;
    for(var i=0; i < count; i )
    {
    shellMenu[1][i] = w2.PopupMenu.Items(i).Caption;
    }

    I thought this have no problem but it worked incorrectly.
    The expected value of 'count' is 12 but it has 4 which is a menu count of one among submenu. For example, If popup have 12 menu and one of them have 4 menu, then 'count' is 4 not 12! Can you understand this situation? Please give me a hand.

  2. #2
    Senior Member
    Join Date
    Nov 2002
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: About missing letters and popup menu handling

    Hi,

    [ QUOTE ]
    1. I made a script to type letters into text field. Here is my script.

    [/ QUOTE ]
    I was unable to reproduce the problem here. However, I suggest that you avoid working with Explorer the way you do. I guess you want to run the 'format.exe' application that is located in the 'e:\tcdata\alzip\' folder. If so, I recommend using the WinExec function from the Win32 API to run this application. For example:
    <font class="small">Code:</font><hr /><pre> Win32API.WinExec("e:\\tcdata\\alzip\\format.exe", SW_SHOW);</pre><hr />

    [ QUOTE ]
    2. I want to find a certain menu in popup and made below script(to store all menu in popup).

    [/ QUOTE ]
    Please see the following script that posts items of a popup menu to the log.
    <font class="small">Code:</font><hr /><pre>function Test1()
    {
    var p1;
    var w1;
    var w2;
    p1 = Sys.Process("IEXPLORE");
    w1 = p1.Window("IEFrame", "*").Window("Shell DocObject View").Window("Internet Explorer_Server");
    w1.ClickR(30, 30);
    LogPopupMenu(w1);
    w1.PopupMenu.Close();
    }

    function LogPopupMenu(Obj)
    {
    var pMenu, childCount, i, Str1, Str2;

    if (BuiltIn.IsSupported(Obj, "PopupMenu")) {
    pMenu = Obj.PopupMenu;
    childCount = pMenu.Count;
    Log.AppendFolder("PopupMenu", childCount);
    }
    else {
    pMenu = Obj.SubMenu;
    childCount = pMenu.Count;
    Log.AppendFolder(Obj.Caption, childCount);
    }

    for (i=0; i&lt;childCount; i++) {
    if (pMenu.Items(i).SubMenu) {
    LogPopupMenu(pMenu.Items(i));
    continue;
    }

    if (pMenu.Items(i).isSeparator) {
    Str1 = "----------";
    Str2 = "";
    }
    else {
    Str1 = pMenu.Items(i).Caption;
    if (pMenu.Items(i).Enabled) Str2 = "Enabled"
    else Str2 = "Disabled";
    }

    Log.Message(Str1, Str2);
    }
    Log.PopLogFolder();
    }</pre><hr />
    Regards,
    Irene - SmartBear Support

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Location
    Seoul, Korea
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: About missing letters and popup menu handling

    Thanks a lot, Irene!
    In my first question, I think that question is not clear so I'll make that clear.
    The point is 'missing letter'. So upper script is just example.
    Frankly, I want to type letters into text field which is 'password input field' in compression program like Winzip. If anyone who know this phenomenon is here, please help me.

  4. #4
    Senior Member
    Join Date
    Nov 2002
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: About missing letters and popup menu handling

    Hi,

    To make sure that the correct text is entered into a field, you can put the text to the field programmatically by using the wText property:
    <font class="small">Code:</font><hr /><pre> // JScript
    ...
    p1 = Sys.Process("MyWinZIPArchive");
    w1 = p1.Window("#32770", "*");
    w1.Window("Button", "&amp;Unzip").ClickButton();
    w2 = p1.Window("#32770", "WinZip Self-Extractor - Password");
    w3 = w2.Window("Edit");
    w3.wText = "myPassword";
    w2.Window("Button", "OK").ClickButton();
    ...</pre><hr />
    Regards,
    Irene - SmartBear Support

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Location
    Seoul, Korea
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: About missing letters and popup menu handling

    Thank you~ It works well~

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:25 PM.

Copyright BetaSoft Inc.