Jump to content

Recommended Posts

Posted

Hi people of autoit world :D , today im here why i have a problem whit a little script.

#RequireAdmin
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>
#include <File.au3>
#include <IE.au3>
#include <FTPEx.au3>
#include <MISC.au3>
#include <GUIListBox.au3>
#include <Array.au3>

#pragma compile(AutoItExecuteAllowed, true)


$FLOPP=FileOpen("C:\Force4 Cleaner\plugins-est\file_load.txt")
If $FLOPP=1 Then
   If FileReadLine($FLOPP,1)="START" Then
      _FileCreate("C:\Force4 Cleaner\plugins-est\files.txt")
      $FILES=FileFindFirstFile("C:\Force4 Cleaner\plugins-est\*.plg")
      For $SNIP=1 To 10 Step +1
         $FILES1=FileFindNextFile($FILES)
         If @error Then
            ExitLoop
         Else
            FileWriteLine("C:\Force4 Cleaner\plugins-est\files.txt",$FILES1)
         EndIf
      Next
      For $SNIP2=1 to 10 Step +1
         $FLL=FileReadLine("C:\Force4 Cleaner\plugins-est\files.txt",$SNIP2)
         $FULL="C:\Force4 Cleaner\plugins-est\"&$FLL
         If $FULL="C:\Force4 Cleaner\plugins-est\" Then
            ExitLoop
         Else
            Run("Force4 C.exe"&"/AutoIt3ExecuteScript "&$FULL)
            if @error Then
               MsgBox(48,"Error",@error &" AT: "&$FULL)
            EndIf
         EndIf
      Next
   EndIf
EndIf

i have tryed to found a solutions , but after 10-15 attempts , the script don't work , it will give me at error  (ERROR : 1 ).... i don't know where im wrong.....the code is just , why that error? anyone have a idee for that error?

Posted

Because you should at least add a space:

Run("Force4 C.exe " & "/AutoIt3ExecuteScript " & $FULL)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

i think who works , but when i tryed to watch if work i received a new messagge of error on this script:

#RequireAdmin
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>
#include <File.au3>
#include <IE.au3>
#include <FTPEx.au3>
#include <MISC.au3>
#include <GUIListBox.au3>
#include <Array.au3>

#pragma compile(AutoItExecuteAllowed, true)

$FLOPP=FileOpen("C:\Force4 Cleaner\plugins-est\file_load.txt")
If $FLOPP=1 Then
   If FileReadLine($FLOPP,1)="START" Then
      _FileCreate("C:\Force4 Cleaner\plugins-est\files.txt")
      $FILES=FileFindFirstFile("C:\Force4 Cleaner\plugins-est\*.plg")
      For $SNIP=1 To 10 Step +1
         $FILES1=FileFindNextFile($FILES)
         FileWriteLine("C:\Force4 Cleaner\plugins-est\files.txt",$FILES1)
      Next
      For $SNIP2=1 to 10 Step +1
         $FLL=FileReadLine("C:\Force4 Cleaner\plugins-est\files.txt",$SNIP2)
         MsgBox(0,"1",$FLL)
         $FULL="C:\Force4 Cleaner\plugins-est\"&$FLL
         MsgBox(0,"2",$FULL)
         If $FULL="C:\Force4 Cleaner\plugins-est\" Then
            ExitLoop
         EndIf
         $RUN=Run("Force4 C.exe " & "/AutoIt3ExecuteScript " & $FULL)
         MsgBox(0,"3",$RUN)
         if @error Then
            MsgBox(48,"Error",@error &" AT: "&$FULL)
         EndIf
      Next
   EndIf
EndIf

the error is:

w2jb77.png

and i not know the sense and why that... i already searched for this error on script , and i found where hes start.  In the new script (here up) i put 3 msgbox to watch where the error start and , start after the msgbox n°3 but i don't know why..... anyone know how to resolve it?

Posted

I think you need to add quotes (didn't test it):

$RUN=Run("Force4 C.exe " & "/AutoIt3ExecuteScript '" & $FULL & "'")

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

thanks , but i have another problem (lulz):

$RUN=Run(" Force4 C.exe " & "' /AutoIt3ExecuteScript '" & $FULL & "'")

this is the correct. Now i don't give any tipe of messagge / error , but now....don't work the load of file, it need to execute the script who is in a file , but now it don't work. Now i will try to search a solution , but if you know how to resolve this?

Posted

Is there really a space in "Force4 C.exe"?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted
On 23/2/2016 at 6:21 PM, water said:

Is there really a space in "Force4 C.exe"?

yes , here is a space , now i trying "Force4_c.exe" but don't work :(

Posted (edited)

Hi.

 

You will need to qoute the "EXE-with-the-Space-in-its-Name"

 

 

$result=RunWait( '"Force4 C.EXE" /AutoIt3ExecuteScript "further params with spaces"',"C:\some\working\directory",@SW_SHOW)

 

Regards, Rudi.

<edit: typo>

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...