WinTools project for You! need some corrections

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • siray
    Forum Member
    • Oct 2006
    • 120

    WinTools project for You! need some corrections

    Hi All...

    Here it is my example project to call/execute/run some Windows tools, and some registry tweaking (attached below).

    This project can call some "visible" and "invisible" windows tools, like regedit, admin tools, msconfig, etc. in one button that will show a pop up menu which contains list of windows tools. And also some registry tweaking like adding
    "Empty Recycle Bin" on right-click menu, remove Shorcut To.. prefix on desktop shorcut name, etc.

    But i have a little problem with this script below:

    I wanna show a dialog message that will tell the user if no usb drive found.
    Where can i put the script line to do that in this script below ?

    Dialog.TimedMessage("Please Wait...", "Looking for USB Drive.....................", 3000, MB_ICONNONE);
    tbDrives = Drive.Enumerate();
    for index, cDrive in tbDrives do
    DriveType = Drive.GetType(cDrive);
    if DriveType == 2 then -- DRIVE_REMOVABLE
    tbInfo = Drive.GetInformation(cDrive);

    if tbInfo then
    Dialog.TimedMessage("Please Wait...", tbInfo.DisplayName..".....................", 2000, MB_ICONNONE);
    File.ExploreFolder(cDrive, SW_SHOWNORMAL);

    end
    end
    end

    i've tried to put a script like this after File.ExploreFolder:


    else
    Dialog.Message("Notice", "No Usb drive found!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    but nothing happened. No dialog message show up.

    Can you guys tell me how to correct this script, pls?


    Note: i also try to put that script to different position and connect/disconnect my usb stick to see the result, but nothing happened.


    Thanks, sorry my poor english
    SiRAY
    Attached Files
  • yosik
    Indigo Rose Customer
    • Jun 2002
    • 1858

    #2
    I would put this script in an onTimer event which you can launch in the onSHow event of a page (you decide the time span).

    Good luck
    Yossi

    Comment

    • siray
      Forum Member
      • Oct 2006
      • 120

      #3
      Originally posted by yosik View Post
      I would put this script in an onTimer event which you can launch in the onSHow event of a page (you decide the time span).
      which script that i should put on Timer event yosik?
      the dialog message (not found message, second quote) or all of entire script?

      thanks

      Comment

      • arb
        Indigo Rose Customer
        • Jul 2007
        • 163

        #4
        Originally posted by siray View Post
        Where can i put the script line to do that in this script below ?
        Try this

        Code:
        Dialog.TimedMessage("Please Wait...", "Looking for USB Drive.....................", 3000, MB_ICONNONE);
        [COLOR="DarkRed"]USBFind = false;[/COLOR]
        tbDrives = Drive.Enumerate();
        for index, cDrive in tbDrives do
        	DriveType = Drive.GetType(cDrive);
        	if DriveType == 2 then -- DRIVE_REMOVABLE
        		[COLOR="darkred"]USBFind = true;[/COLOR]
        		tbInfo = Drive.GetInformation(cDrive);
        		if tbInfo then
        			Dialog.TimedMessage("Please Wait...", tbInfo.DisplayName..".....................", 2000, MB_ICONNONE);
        			File.ExploreFolder(cDrive, SW_SHOWNORMAL);
        		end
        	end
        end  
        [COLOR="darkred"]if not USBFind then Dialog.Message("Notice", "No USB drive found!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end[/COLOR]

        Comment

        • siray
          Forum Member
          • Oct 2006
          • 120

          #5
          Very thanks Arb :yes :yes i very appreciate that
          Attached Files
          Last edited by siray; 07-23-2008, 03:10 PM.

          Comment

          • ShadowUK
            No longer a forum member
            • Oct 2007
            • 1322

            #6
            Originally posted by siray View Post
            Very thanks Arb :yes :yes i very appreciate that
            That right there is an AMAZING window mask.

            Comment

            • siray
              Forum Member
              • Oct 2006
              • 120

              #7
              Originally posted by arb View Post
              Try this
              if not USBFind then Dialog.Message("Notice", "No USB drive found!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end[/CODE]
              that script doesn't works when there's no usb stick connected on my computer, no dialog message appeared, why?

              thanks


              to ShadowUK:
              That right there is an AMAZING window mask
              first i made it as a vector art, then edited in photoshop, then coded in AMS
              Last edited by siray; 07-25-2008, 08:47 AM.

              Comment

              • siray
                Forum Member
                • Oct 2006
                • 120

                #8

                Comment

                • Imagine Programming
                  Indigo Rose Customer
                  • Apr 2007
                  • 4252

                  #9
                  Uhm please keep it English here folks... i'm not gonna speak dutch to my dutch colleages either... and when i do... i always put a translated sentence below it...
                  Bas Groothedde
                  Imagine Programming :: Blog

                  AMS8 Plugins
                  IMXLH Compiler

                  Comment

                  • ShadowUK
                    No longer a forum member
                    • Oct 2007
                    • 1322

                    #10
                    Originally posted by C B programming and webdesign View Post
                    Uhm please keep it English here folks... i'm not gonna speak dutch to my dutch colleages either... and when i do... i always put a translated sentence below it...
                    Agreed....

                    Comment

                    • siray
                      Forum Member
                      • Oct 2006
                      • 120

                      #11
                      confused i dont understand turkish..pls..

                      Comment

                      • Imagine Programming
                        Indigo Rose Customer
                        • Apr 2007
                        • 4252

                        #12
                        Originally posted by siray View Post
                        confused i dont understand turkish..pls..
                        Indeed, as i say, English please
                        Bas Groothedde
                        Imagine Programming :: Blog

                        AMS8 Plugins
                        IMXLH Compiler

                        Comment

                        • siray
                          Forum Member
                          • Oct 2006
                          • 120

                          #13
                          :lol indeed

                          Comment

                          • arb
                            Indigo Rose Customer
                            • Jul 2007
                            • 163

                            #14
                            Originally posted by siray View Post
                            that script doesn't works when there's no usb stick connected on my computer, no dialog message appeared, why?
                            Do you set the USBFind Boolean where I said? because it works right for me.

                            Comment

                            • siray
                              Forum Member
                              • Oct 2006
                              • 120

                              #15
                              Originally posted by arb View Post
                              Do you set the USBFind Boolean where I said? because it works right for me.

                              i just copy and paste that scripts from you. It just works when usb stick is connected to computer. But if no usb attached, no dialog message show up

                              Comment

                              Working...
                              X