Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    137

    how to speed reading script commands

    how to speed reading script commands . when i put about 40 codes it has been very slow in reading them and that make my project extremely slow .

    this my script

    Image.SetOpacity("ideal", 100);
    Image.SetOpacity("Lab", 0);
    Image.SetOpacity("Rotate", 0);
    Image.SetOpacity("optical properties h", 0);
    Image.SetOpacity("polarized1", 0);
    Image.SetOpacity("Analyzed1", 0);
    Image.SetOpacity("move stage", 0);
    Image.SetOpacity("optical properties T", 0);


    Button.SetEnabled("ideal 1", false);
    Button.SetEnabled("lab.", true);
    Button.SetEnabled("rotate 1", true);
    Button.SetEnabled("optical properties H", true);
    Button.SetEnabled("polarized 1", true);
    Button.SetEnabled("analyzed", true);
    Button.SetEnabled("move stage", true);
    Button.SetEnabled("optical properties T", true);



    Image.SetOpacity("1", 30);
    Image.SetOpacity("2", 100);
    Image.SetOpacity("3", 100);
    Image.SetOpacity("4", 100);
    Image.SetOpacity("5", 100);
    Image.SetOpacity("6", 100);
    Image.SetOpacity("7", 100);
    Image.SetOpacity("8", 100);

  2. #2
    Join Date
    Jul 2009
    Posts
    137

    i forgot to say

    this script is used in button object and when i press the button it takes a lot of time to perform the script command . so how to make my project fast .

    note : i have 8 small jpeg pictures in that page.

  3. #3
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    instead of setting image opacity to 0 or 100, try using Image.SetVisable to true or false.

    Also, set te page redraw to off at the beginning of your actions, then back on at the end. ie:

    Code:
    Application.SetRedraw(false);
     
    Image.SetVisible("ideal", true);
    Image.SetVisible("Lab", false);
    Image.SetVisible("Rotate", false);
    Image.SetVisible("optical properties h", false);
    Image.SetVisible("polarized1", false);
    Image.SetVisible("Analyzed1", false);
    Image.SetVisible("move stage", false);
    Image.SetVisible("optical properties T", false);
    
    
    Button.SetEnabled("ideal 1", false);
    Button.SetEnabled("lab.", true);
    Button.SetEnabled("rotate 1", true);
    Button.SetEnabled("optical properties H", true);
    Button.SetEnabled("polarized 1", true);
    Button.SetEnabled("analyzed", true);
    Button.SetEnabled("move stage", true);
    Button.SetEnabled("optical properties T", true);
    
    
    Image.SetOpacity("1", 30);
    Image.SetVisible("2", true);
    Image.SetVisible("3", true);
    Image.SetVisible("4", true);
    Image.SetVisible("5", true);
    Image.SetVisible("6", true);
    Image.SetVisible("7", true);
    Image.SetVisible("8", true);
    
    Application.SetRedraw(true);
    
    Page.Redraw();
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  4. #4
    Join Date
    Jul 2009
    Posts
    137

    thank u very much

    thank u very much, adding setvisible code instead of setopacity make it faster . but setredraw commands did a strange effect and i don't know what is the point of using it .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts