Sign in to follow this  
Followers 0
Colortron

Need some help

7 posts in this topic

I am new in programing and looking for an action on folder for PC.

I need a folder when you load a CIP3 .ppf file call an application and save in another folder with the default format.

thanks in advance.

Share this post


Link to post
Share on other sites



Colortron,

Welcome to the AutoIt forum. :)

But please pay attention to where you post - the "Examples" section where you started this thread is clearly marked: "This is NOT a general support forum!". I have moved the thread for you, but would ask you to be more careful in future. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Colortron,

Welcome to the AutoIt forum. :)

But please pay attention to where you post - the "Examples" section where you started this thread is clearly marked: "This is NOT a general support forum!". I have moved the thread for you, but would ask you to be more careful in future. ;)

M23

I am sorry this is my firts post, i will take care in the future. Thanks

Share this post


Link to post
Share on other sites

I am new in programing and looking for an action on folder for PC.

I need a folder when you load a CIP3 .ppf file call an application and save in another folder with the default format.

thanks in advance.

 

Hi, Colortron, welcome to the forum. Unfortunately, you could not have provided less information if you'd tried. Can you please tell us:

  • What do you mean "load a CIP3.ppf file?
    • Drag and drop on a GUI?
    • Browse to it from a File Open Dialog?
    • Prompt the user to type in a path?
  • When you say "call an application"?
    • What application?
    • What is tha path to the application?
    • Are you just opening the application, or do you need to pass parameters?
  • When you say "save in another folder with the default format"?
    • What folder are you saving to?
    • Is the default format different from what it starts out as (.ppf)?

 

As you can see, your post leaves a lot to be desired. Please fill in some of the blanks, and help us help you ;)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Load a CIP3 file.

  • We use an 2007 RIP (Raster Image Procesor) that let save a CIP3 file anywhere.
  • The printing machine dont understand this kind of file so we have to open CipConv.exe to covert the CIp3 file (.ppf) to a .hip file that´s the format the machine interpret.

The idea is that the prepress worker save the cip3 file in a monitored folder in the machine operator pc and this one only have to load this .hip file.

Thank you for your patience

Hi, Colortron, welcome to the forum. Unfortunately, you could not have provided less information if you'd tried. Can you please tell us:

  • What do you mean "load a CIP3.ppf file?
    • Drag and drop on a GUI?
    • Browse to it from a File Open Dialog?
    • Prompt the user to type in a path?
  • When you say "call an application"?
    • What application?
    • What is tha path to the application?
    • Are you just opening the application, or do you need to pass parameters?
  • When you say "save in another folder with the default format"?
    • What folder are you saving to?
    • Is the default format different from what it starts out as (.ppf)?

 

As you can see, your post leaves a lot to be desired. Please fill in some of the blanks, and help us help you ;)We use a Rase

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Heres a framework for you:

#include <File.au3>
#include <Array.au3>
Global $exe_converter='<fullpath to exe>'

; be sure to used dot
Global $file_ext_to_monitor='.cip3'
Global $file_ext_new='.hip'


;watch this path for files of $file_ext_to_monitor:
Global $path_to_monitor='C:\some\path'

;files of $file_ext_to_monitor will be moved to:
Global $output_path_src='C:\some\other\path'

;files of $file_ext_new will be moved to:
Global $output_path_new='C:\some\other2\path'

;Change to false to get it to work
Global $testing=True

; if your program allows you to specify a full output path, use way 0, otherwise this program will move it
Global $call_way=0

;template for the call, YOU MAY HAVE TO MODIFY TO SUIT
Global $call_mask
If False Then
ElseIf $call_way==0 Then
  ; use this way 
  ; if you can specify            FULLPATH         FULLPATH
  $call_mask='"%exe_converter%" "%in_src_file%" "%in_new_file%"'
ElseIf $call_way==1 Then
  ; use this way 
  ; if you can specify            FULLPATH       and the file is created in current dir
  $call_mask='"%exe_converter%" "%in_src_file%"'
EndIf

; in test mode we will only do one file
Global $check_every_seconds=60

; filling in your specification from above for the exe
Global $call=StringReplace($call_mask,'%exe_converter%',$exe_converter)


Local $a


; do it forever, the script can be terminated from its tray icon
; but if we are testing only simulate one file
While True
  ;_FileListToArray($sPath [, $sFilter = "*" [, $iFlag = 0]])
  $a=_FileListToArray($path_to_monitor, '*'&$file_ext_to_monitor,1); 1= get only files
  If $testing Then
    _ArrayDisplay($a,'Candidate Files in '&$path_to_monitor)
  EndIf
  Local $x,$end=$a[0],$i
  Local $c
  Local $out_src_file
  Local $out_new_file
  Local $in_src_file
  Local $in_new_file
  For $x=1 To $end
    $i=$a[$x]
    $out_src_file=getSrcOutFilePath($i)
    $in_src_file=getSrcOutFilePath($i)
    ;
    $out_new_file=getNewOutFilePath($i)
    $in_new_file=getNewInFilePath($i)
    ;
    If $testing Then
      MsgBox(0,'Files are:', _
         '$in_src_file:'&$in_src_file&@CRLF _
        &'$out_src_file:'&$out_src_file&@CRLF _
        &'$out_new_file:'&$in_new_file&@CRLF _
        &'$in_new_file:'&$in_new_file&@CRLF _
        )
    EndIf
    $c=StringReplace($call,'%in_src_file%',$in_src_file)
    If $call_way==1 Then
      $c=StringReplace($c,'%in_new_file%',$in_new_file)
    EndIf
    ;
    If $testing Then
      MsgBox(0,'The following command would be run:',$c&@CRLF&'In Directory:'&$path_to_monitor)
    Else
      RunWait($c,$path_to_monitor);
    EndIf
    ;
    If $testing Then
      MsgBox(0,'Source File Moved','from:'&$in_src_file&@CRLF&'To:'&$out_src_file)
    Else
      FileMove($in_src_file,$out_src_file);move it so it doesnt happen again
    EndIf
    ;
    If $call_way==1 Then
      If $testing Then
        MsgBox(0,'Call way is 1, so New File Moved','from:'&$in_new_file&@CRLF&'To:'&$out_new_file)
      Else
        FileMove($in_new_file,$out_new_file);move the output
      EndIf
    EndIf
    ;
    If $testing Then
      Exit
    EndIf
  Next
  Sleep($check_every_seconds*1000)
WEnd


Func getNewOutFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $output_path_new&'\'&$szFName&$file_ext_new
EndFunc

Func getNewInFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $path_to_monitor&'\'&$szFName&$file_ext_new
EndFunc


Func getSrcOutFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $output_path_src&'\'&$szFName&$szExt
EndFunc

Func getSrcInFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $path_to_monitor&'\'&$szFName&$szExt
EndFunc
Edited by MarkRobbins

Share this post


Link to post
Share on other sites

 

Heres a framework for you:

#include <File.au3>
#include <Array.au3>
Global $exe_converter='<fullpath to exe>'

; be sure to used dot
Global $file_ext_to_monitor='.cip3'
Global $file_ext_new='.hip'


;watch this path for files of $file_ext_to_monitor:
Global $path_to_monitor='C:\some\path'

;files of $file_ext_to_monitor will be moved to:
Global $output_path_src='C:\some\other\path'

;files of $file_ext_new will be moved to:
Global $output_path_new='C:\some\other2\path'

;Change to false to get it to work
Global $testing=True

; if your program allows you to specify a full output path, use way 0, otherwise this program will move it
Global $call_way=0

;template for the call, YOU MAY HAVE TO MODIFY TO SUIT
Global $call_mask
If False Then
ElseIf $call_way==0 Then
  ; use this way 
  ; if you can specify            FULLPATH         FULLPATH
  $call_mask='"%exe_converter%" "%in_src_file%" "%in_new_file%"'
ElseIf $call_way==1 Then
  ; use this way 
  ; if you can specify            FULLPATH       and the file is created in current dir
  $call_mask='"%exe_converter%" "%in_src_file%"'
EndIf

; in test mode we will only do one file
Global $check_every_seconds=60

; filling in your specification from above for the exe
Global $call=StringReplace($call_mask,'%exe_converter%',$exe_converter)


Local $a


; do it forever, the script can be terminated from its tray icon
; but if we are testing only simulate one file
While True
  ;_FileListToArray($sPath [, $sFilter = "*" [, $iFlag = 0]])
  $a=_FileListToArray($path_to_monitor, '*'&$file_ext_to_monitor,1); 1= get only files
  If $testing Then
    _ArrayDisplay($a,'Candidate Files in '&$path_to_monitor)
  EndIf
  Local $x,$end=$a[0],$i
  Local $c
  Local $out_src_file
  Local $out_new_file
  Local $in_src_file
  Local $in_new_file
  For $x=1 To $end
    $i=$a[$x]
    $out_src_file=getSrcOutFilePath($i)
    $in_src_file=getSrcOutFilePath($i)
    ;
    $out_new_file=getNewOutFilePath($i)
    $in_new_file=getNewInFilePath($i)
    ;
    If $testing Then
      MsgBox(0,'Files are:', _
         '$in_src_file:'&$in_src_file&@CRLF _
        &'$out_src_file:'&$out_src_file&@CRLF _
        &'$out_new_file:'&$in_new_file&@CRLF _
        &'$in_new_file:'&$in_new_file&@CRLF _
        )
    EndIf
    $c=StringReplace($call,'%in_src_file%',$in_src_file)
    If $call_way==1 Then
      $c=StringReplace($c,'%in_new_file%',$in_new_file)
    EndIf
    ;
    If $testing Then
      MsgBox(0,'The following command would be run:',$c&@CRLF&'In Directory:'&$path_to_monitor)
    Else
      RunWait($c,$path_to_monitor);
    EndIf
    ;
    If $testing Then
      MsgBox(0,'Source File Moved','from:'&$in_src_file&@CRLF&'To:'&$out_src_file)
    Else
      FileMove($in_src_file,$out_src_file);move it so it doesnt happen again
    EndIf
    ;
    If $call_way==1 Then
      If $testing Then
        MsgBox(0,'Call way is 1, so New File Moved','from:'&$in_new_file&@CRLF&'To:'&$out_new_file)
      Else
        FileMove($in_new_file,$out_new_file);move the output
      EndIf
    EndIf
    ;
    If $testing Then
      Exit
    EndIf
  Next
  Sleep($check_every_seconds*1000)
WEnd


Func getNewOutFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $output_path_new&'\'&$szFName&$file_ext_new
EndFunc

Func getNewInFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $path_to_monitor&'\'&$szFName&$file_ext_new
EndFunc


Func getSrcOutFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $output_path_src&'\'&$szFName&$szExt
EndFunc

Func getSrcInFilePath($i)
  Local $szDrive, $szDir, $szFName, $szExt
  _PathSplit($i,$szDrive, $szDir, $szFName, $szExt)
  Return $path_to_monitor&'\'&$szFName&$szExt
EndFunc

thank you very much Mark, i will probe it.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0