bucky002 Posted May 11, 2006 Share Posted May 11, 2006 (edited) Do you have the beta? Have you actually tried to run the script or was that AU3check?If you ran AU3check I think it's because SciTe hasn't been updated for some of the beta stuff, so it doesn't really know what it is. I ran it and had no errors. If you don't have the beta you need it to run this script. So run it instead of AU3check and tell me if it works. Edited May 11, 2006 by bucky002 Link to comment Share on other sites More sharing options...
meetrix Posted May 11, 2006 Author Share Posted May 11, 2006 I'm running the BETA version. I also changed SciTe to work with the BETA. I am able to run the script using Beta run without errors, but the print function is not working. I test it with a system that has a printer connected, but it not work. I will keep trying.. theres gotta be something that I'm overlooking or not doing correctly. I have another script that runs and prints, but I need this script to work because it has the fucntions I need. Do you have the beta? Have you actually tried to run the script or was that AU3check?If you ran AU3check I think it's because SciTe hasn't been updated for some of the beta stuff, so it doesn't really know what it is. I ran it and had no errors. If you don't have the beta you need it to run this script.So run it instead of AU3check and tell me if it works. Link to comment Share on other sites More sharing options...
bucky002 Posted May 11, 2006 Share Posted May 11, 2006 (edited) This prints the file, but is missing A LOT of functions you wanted. If you can post up the script that does print maybe we can figure it out. #include <File.au3> $Loop = 1 While $Loop = 1 $s_serial = InputBox("Kagoor Report File", "Scan Parent Serial Number."&@CRLF&"Then Click OK to proceed.") If @error = 1 Then $answer = MsgBox(4, "WARNING!", "You pressed 'Cancel', Do you want to Exit?") If $answer = 6 Then Exit EndIf Else If $s_serial = "" Then MsgBox(4096, "ERROR", "You Must Enter a Serial Number- try again!") Else $Loop = 0 EndIf EndIf WEnd #include <file.au3> #include <array.au3> ;Search for Serial Number and Create Report $s_path = "C:\CustomerLogs\" $a_filelist = $s_path ;$print = _FilePrint($s_path&$s_serial&".log") ;Print the Report file _FilePrint($s_path&$s_serial&".log") Edited May 11, 2006 by bucky002 Link to comment Share on other sites More sharing options...
Developers Jos Posted May 11, 2006 Developers Share Posted May 11, 2006 I think it's because SciTe hasn't been updated for some of the beta stuff, so it doesn't really know what it is.Can you explain what you mean ?I haven't been posting updates because there haven't been any changes/updates to the functions.. (just one single UDF update which doesn;t really justify and update) SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bucky002 Posted May 11, 2006 Share Posted May 11, 2006 Can you explain what you mean ?I haven't been posting updates because there haven't been any changes/updates to the functions.. (just one single UDF update which doesn;t really justify and update)Eh, I didn't mean to state it as a fact. It came out like I thought it was a fact, but sorry it just was a thought. The reason I thought this is because when I did beta run it came up with errors, but when I ran it, it didn't have any errors. Therefore making me think that it just hadn't been updated for the beta functions. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 11, 2006 Developers Share Posted May 11, 2006 Eh, I didn't mean to state it as a fact. It came out like I thought it was a fact, but sorry it just was a thought. The reason I thought this is because when I did beta run it came up with errors, but when I ran it, it didn't have any errors. Therefore making me think that it just hadn't been updated for the beta functions.np... just checking if I missed something... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
meetrix Posted May 11, 2006 Author Share Posted May 11, 2006 PrintTest.au3 Here is the script and a text file with the error message. I was able to make it print , but this time a different error appears. This prints the file, but is missing A LOT of functions you wanted. If you can post up the script that does print maybe we can figure it out. #include <File.au3> $Loop = 1 While $Loop = 1 $s_serial = InputBox("Kagoor Report File", "Scan Parent Serial Number."&@CRLF&"Then Click OK to proceed.") If @error = 1 Then $answer = MsgBox(4, "WARNING!", "You pressed 'Cancel', Do you want to Exit?") If $answer = 6 Then Exit EndIf Else If $s_serial = "" Then MsgBox(4096, "ERROR", "You Must Enter a Serial Number- try again!") Else $Loop = 0 EndIf EndIf WEnd #include <file.au3> #include <array.au3> ;Search for Serial Number and Create Report $s_path = "C:\CustomerLogs\" $a_filelist = $s_path ;$print = _FilePrint($s_path&$s_serial&".log") ;Print the Report file _FilePrint($s_path&$s_serial&".log") Link to comment Share on other sites More sharing options...
bucky002 Posted May 11, 2006 Share Posted May 11, 2006 This should work. Worked for me without any errors. If you do beta run and it comes up with errors press "continue anyway". expandcollapse popup#include <File.au3> $Loop = 1 While $Loop = 1 $s_serial = InputBox("Kagoor Report File", "Scan Parent Serial Number."&@CRLF&"Then Click OK to proceed.") If @error = 1 Then $answer = MsgBox(4, "WARNING!", "You pressed 'Cancel', Do you want to Exit?") If $answer = 6 Then Exit EndIf Else If $s_serial = "" Then MsgBox(4096, "ERROR", "You Must Enter a Serial Number- try again!") Else $Loop = 0 EndIf EndIf WEnd #include <file.au3> #include <array.au3> ;Search for Serial Number and Create Report $s_path = "C:\CustomerLogs\" $a_filelist = _FileListToArray($s_path) If (Not IsArray($a_filelist)) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf For $i = 0 to Ubound($a_filelist)-1 $a_searchresult = StringRegExp($a_filelist[$i],'('&$s_serial&'_[0-9]{1}_[0-9]{14}.log)',1) If IsArray($a_searchresult) = 1 Then MsgBox(0,"File Found!","File: "&$a_filelist[$i]&" Matches: "&$s_serial&@CRLF&"Copying to "&$s_path&$s_serial&".log",2) FileCopy ( $s_path&$a_filelist[$i], $s_path&$s_serial&".log",1) EndIf Next ;Print the Report. $i_Show = @SW_HIDE $File = _FilePrint ($s_path&$s_serial&".log") _FilePrint($File, $i_Show) Local $a_Ret = DllCall("shell32.dll", "long", "ShellExecute", _ "hwnd", 0, _ "string", "print", _ "string", $File, _ "string", "", _ "string", "", _ "int", $i_Show) If $a_Ret[0] > 32 And Not @error Then Return 1 Else SetError($a_Ret[0]) Return 0 EndIf Link to comment Share on other sites More sharing options...
meetrix Posted May 12, 2006 Author Share Posted May 12, 2006 You are a genious. It worked. WOW. Thank you very much. It has been driving crazy trying to figure it out. There are just a few things that I need to add to it before I complete this project. I will try first on my own and if I run into any issues I will ask for support. As far as posting scripts that are readable, I think I know how now.. Again, Thank you and have a great day. Meetrix. This should work. Worked for me without any errors. If you do beta run and it comes up with errors press "continue anyway". expandcollapse popup#include <File.au3> $Loop = 1 While $Loop = 1 $s_serial = InputBox("Kagoor Report File", "Scan Parent Serial Number."&@CRLF&"Then Click OK to proceed.") If @error = 1 Then $answer = MsgBox(4, "WARNING!", "You pressed 'Cancel', Do you want to Exit?") If $answer = 6 Then Exit EndIf Else If $s_serial = "" Then MsgBox(4096, "ERROR", "You Must Enter a Serial Number- try again!") Else $Loop = 0 EndIf EndIf WEnd #include <file.au3> #include <array.au3> ;Search for Serial Number and Create Report $s_path = "C:\CustomerLogs\" $a_filelist = _FileListToArray($s_path) If (Not IsArray($a_filelist)) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf For $i = 0 to Ubound($a_filelist)-1 $a_searchresult = StringRegExp($a_filelist[$i],'('&$s_serial&'_[0-9]{1}_[0-9]{14}.log)',1) If IsArray($a_searchresult) = 1 Then MsgBox(0,"File Found!","File: "&$a_filelist[$i]&" Matches: "&$s_serial&@CRLF&"Copying to "&$s_path&$s_serial&".log",2) FileCopy ( $s_path&$a_filelist[$i], $s_path&$s_serial&".log",1) EndIf Next ;Print the Report. $i_Show = @SW_HIDE $File = _FilePrint ($s_path&$s_serial&".log") _FilePrint($File, $i_Show) Local $a_Ret = DllCall("shell32.dll", "long", "ShellExecute", _ "hwnd", 0, _ "string", "print", _ "string", $File, _ "string", "", _ "string", "", _ "int", $i_Show) If $a_Ret[0] > 32 And Not @error Then Return 1 Else SetError($a_Ret[0]) Return 0 EndIf Link to comment Share on other sites More sharing options...
bucky002 Posted May 12, 2006 Share Posted May 12, 2006 (edited) Happy to have helped. Edited May 12, 2006 by bucky002 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now