Stuck on the easiest thing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CtrlAltDel
    Forum Member
    • Feb 2004
    • 6

    Stuck on the easiest thing

    Hi all,
    I know this is really a stupid question but i've been try reading everywhere and trying it but it doesnt seem to work.

    I am creating a start of application so I can include my often used programs and sort of get away with the cluttered shortcuts I have on desktop.

    So, I am having trouble opening applications.
    For instance I am trying to open my ZoneAlarm Firewall.
    The path to it is:
    C:\Program Files\Zone Labs\ZoneAlarm\zonealarm.exe

    The code I am using on the action of the button is:
    File.Run("AutoPlay\\Docs\\zonealarm.exe", "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\zonealarm.exe", "", SW_SHOWNORMAL, false);

    But nothing happens, initially I had tried

    File.Run( "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\zonealarm.exe", "", "", SW_SHOWNORMAL, false);

    None of them work. :wah

    Any help is greatly appreciated.
  • CWRIGHT
    Indigo Rose Customer
    • Jun 2002
    • 42

    #2
    Hi CtrlAltDel,

    The initial way you were trying to do this was correct. Perhaps there should be just one \\Zone Labs in the path?

    If you put the following code under your File.Run action, it will give you a better indication of why this is failing:


    error = Application.GetLastError();
    if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error]);
    end



    Hope that helps.

    Comment

    • CtrlAltDel
      Forum Member
      • Feb 2004
      • 6

      #3
      Thanks for replying

      I mistyped here, its only one Zone Labs. The difference between second and first one is as you can see that i gave the working folder in the first one and not the second one.
      The error i get is "File execution failed." But I am sure the path is fine. I tried other stand alone executables as well. None worked :wah

      Thanks for any help,
      CtrlAltDel

      Comment

      • Brett
        Indigo Rose Staff Member
        • Jan 2000
        • 2001

        #4
        Instead of:

        Code:
        File.Run( "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\zonealarm.exe", "", "", SW_SHOWNORMAL, false);
        Use:

        Code:
        [b]File.Open[/b]( "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\zonealarm.exe);
        or, if you need a working folder:

        Code:
        File.Run( "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\zonealarm.exe", "C:\\Program Files\\Zone Labs\\Zone Labs\\ZoneAlarm\\", "", SW_SHOWNORMAL, false);

        Comment

        • CtrlAltDel
          Forum Member
          • Feb 2004
          • 6

          #5
          Thanks for replying Brett, but it still doesnt work. You forgot the quotes in the second code.

          I still get File Execution failed error :wah

          I even had just zonealarm.exe or zonealarm as file name and full path in working folder. No luck same error.

          I thought this was the easiest thing to do :confused:

          Comment

          • CtrlAltDel
            Forum Member
            • Feb 2004
            • 6

            #6
            Edit: Nevermind fixed it: Dont laugh but i had the wrong file name. :
            Its zlclient.exe not zonealarm.exe. Zonealarm.exe is not the firewall interface.

            THANKS A LOT EVERYONE! You've been great!
            -
            CtrlAltDel

            Comment

            • Corey
              Indigo Rose Staff Alumni
              • Aug 2002
              • 9745

              #7
              ::;

              Corey Milner
              Creative Director, Indigo Rose Software

              Comment

              • TJ_Tigger
                Indigo Rose Customer
                • Sep 2002
                • 3159

                #8
                D':oh
                TJ-Tigger
                "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                "Draco dormiens nunquam titillandus."
                Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                Comment

                • CtrlAltDel
                  Forum Member
                  • Feb 2004
                  • 6

                  #9
                  I am stuck on one more thing. I am creating a Listbox so that I have few programs in it so when I double click the program opens. I was trying to use someone's else's template to learn first.

                  This is OnSelect Code:

                  tSelected = ListBox.GetSelected("LB_Files");

                  if Table.Count(tSelected) == 1 then
                  sFilePath = "C:\\Program Files\\Nattyware\\Pixie\\pixie.exe";
                  sText = ListBox.GetItemText("LB_Files", tSelected[1]);
                  sData = ListBox.GetItemData("LB_Files", tSelected[1]);
                  Paragraph.SetText("P_Status", "Text: " ..
                  sText .. "\r\n" .. "Data: " .. sData);
                  else if Table.Count(tSelected) == 2 then
                  sFilePath = "C:\\Program Files\\Microsoft Image Composer\\IMGCOMP.exe";
                  sText = ListBox.GetItemText("LB_Files", tSelected[2]);
                  sData = ListBox.GetItemData("LB_Files", tSelected[2]);
                  Paragraph.SetText("P_Status", "Text: " .. sText .. "\r\n" .. "Data: " .. sData);


                  else if Table.Count(tSelected) == 3 then
                  sFilePath = "C:\\Program Files\\Microangelo\\studio.exe";
                  -- Get the selected item's 'text'
                  sText = ListBox.GetItemText("LB_Files", tSelected[3]);
                  -- Get the selected item's 'data'
                  sData = ListBox.GetItemData("LB_Files", tSelected[3]);
                  -- Output retrieved information to our 'status' paragraph
                  Paragraph.SetText("P_Status", "Text: " .. sText .. "\r\n" .. "Data: " .. sData);
                  -- There are more than one items selected, display message
                  --else
                  Paragraph.SetText("P_Status", "Multiple Items Selected");

                  else if Table.Count(tSelected) == 4 then
                  sFilePath = "C:\\Program Files\\FirmTools\\Album Creator\\ac.exe";
                  -- Get the selected item's 'text'
                  sText = ListBox.GetItemText("LB_Files", tSelected[4]);
                  -- Get the selected item's 'data'
                  sData = ListBox.GetItemData("LB_Files", tSelected[4]);
                  -- Output retrieved information to our 'status' paragraph
                  Paragraph.SetText("P_Status", "Text: " .. sText .. "\r\n" .. "Data: " .. sData);

                  -- There are more than one items selected, display message
                  else
                  Paragraph.SetText("P_Status", "Multiple Items Selected");
                  end
                  end
                  end
                  end
                  -----------------
                  Now Double click code:

                  tSelected = ListBox.GetSelected("LB_Files");

                  if tSelected then
                  for nTableIndex, nListBoxIndex in tSelected do
                  -- Open the selected file in the default application/viewer
                  File.Open(sFilePath, "", SW_SHOWNORMAL);
                  end
                  end


                  ---------------

                  Whats happening is, if i select something, the data associated with it is being displayed. But if i double click it my sFilePath has the same value as the first one basically showing pixie application for each selection.
                  Any help will be appreciated!

                  Thanks

                  Comment

                  • CtrlAltDel
                    Forum Member
                    • Feb 2004
                    • 6

                    #10
                    Any help would be appreciated :wah

                    Comment

                    Working...
                    X