
r3dbull
Members-
Posts
17 -
Joined
-
Last visited
r3dbull's Achievements

Seeker (1/7)
0
Reputation
-
I've looked at that but I can't get rid of the following error: "C:\Program Files (x86)\AutoIt3\Include\OutlookEx.au3" (1272) : ==> The requested action with this object has failed.: $oFolder = $oFolder.Folders($aFolders[$iIndex]) $oFolder = $oFolder^ ERROR EDIT:// I worked out the solution, actually I needed to specify the folder where to create $oItem: Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "address@domain.com\Drafts", "", _ "Subject=TestMail", "BodyFormat=" & $olFormatHTML, "HTMLBody=Bodytext in <b>Test</b>.", "SentOnBehalfOfName=address@domain.com") This way is working perfectly! Thanks a LOT! Luciano
-
Quick question on this special UDF, which I can't still figure out... How can I select the account which I want to send the Email from, in the case I have multiple accounts configured in my Outlook? My script and this UDF are working good so far with a single-account Outlook (Currently using Win7 / Win10 and Outlook 2016). $oOL = _OL_Open() _OL_Wrapper_SendMail($oOL, "ordini@mydomain.com", "", "", "FAX Ordine", "<font face='verdana' color='red'>Nome FAX: </font>" & _ "<font face='verdana' color='black'>"&$faxname&"</font><br><font face='verdana' color='red'>Archiviato in: </font><a href=" & _ "" & $link & ">" & $FaxArchiveDir & "\" & @YEAR & "\" & @MON & "\" & @MDAY &"\</a>",$FaxLocalArchiveDir & "\" & @YEAR & _ "\" & @MON & "\" & $faxname,$olFormatHTML) _OL_Close($oOL) Thanks in advance for any support, Luciano.
-
Need help with .ini to .xls converter :)
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
I finally solved this issue, the problem was the number of colums that Excel allows you to have. I solved by modifying the script and make it take from .ini file only the last 30 records for every sector, which is fine for what I need. This topic can be closed, thanks to everyone -
Need help with .ini to .xls converter :)
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
I think I may have found the problem... I just tried to create a new fresh and clean Excel DB and it is generating only 2 rows, and the 2° has got too many colums... Is there a way to modify my source up there to make like a limit on the number of possible columns? -
First of all consider me as a newbie, then... If I was in you I would add a ConsoleWrite now and then to check the on-going of the script... And, usually other than if you have hidden it, if there isn't the autoit icon on the lower right corner it means that the program isn't running anymore. Be sure to have your console open to check if there is any message. (While having your source code in autoit editor press F8 to show/hide Console)
-
Need help with .ini to .xls converter :)
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
I haven't got that far from where I was Uploaded with ImageShack.us -
Need help with .ini to .xls converter :)
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
Added a COM Error Handler at the very start of my piece of code: Func MyErrFunc() Local $HexNumber Local $strMsg $HexNumber = Hex($oMyError.Number, 8) $strMsg = "Error Number: " & $HexNumber & @CRLF $strMsg &= "WinDescription: " & $oMyError.WinDescription & @CRLF $strMsg &= "Script Line: " & $oMyError.ScriptLine & @CRLF MsgBox(0, "ERROR", $strMsg) SetError(1) Endfunc Check the attached image for the error output, which is: Error Number: 80020009 WinDescription: Script Line: 451 Uploaded with ImageShack.us Now, I sincerely don't know how to step on from here... -
Hello guys, in the following the code of my script that takes as input a .ini file and transform it in a .xls file: EDIT:// Added COM Error Handler as PsaltyDS suggested #include <Excel.au3> #include <Array.au3> Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") Func MyErrFunc() Local $HexNumber, $strMsg = "" $HexNumber = Hex($oMyError.Number, 8) $strMsg = "Error Number: " & $HexNumber & @CRLF $strMsg &= "Source: " & $oMyError.source & @CRLF $strMsg &= "Description: " & $oMyError.description & @CRLF $strMsg &= "WinDescription: " & $oMyError.WinDescription & @CRLF $strMsg &= "Script Line: " & $oMyError.ScriptLine & @CRLF MsgBox(16, "COM ERROR", $strMsg) SetError(1) Endfunc $oExcel=ObjCreate("Excel.Application") $oExcel.Visible=0 $oExcel.WorkBooks.Open("D:\Trash\AutoIT Scripts\Database_Test.xls") If @error=1 Then ConsoleWrite("Error! - Unable to Create the Excel Object!"& @CRLF) ElseIf @error=2 Then ConsoleWrite("Error! - File does not exist!" & @CRLF) EndIf Global $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) Global $iLastUsed =0, $iNextRow=0, $i=0, $var[100000] $var=IniReadSectionNames("Database.ini") For $i=1 To $var[0] _ExcelWriteCell($oExcel,$var[$i],$i,1) $var2=IniReadSection("Database.ini",$var[$i]) For $x=1 to $var2[0][0] _ExcelWriteCell($oExcel,$var2[$x][0],$i,$x+2) Next $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) Next _ExcelBookSave($oExcel) _ExcelBookClose($oExcel) The .ini file, in other words, the input of this "To XLS" converter is being populated every day by new records, that may be new Section Names or new records inside sections. That means that every time I run this converter, I get my .xls file more bigger in meaning of more number of rows and columns. The actual problem is that when I try to convert now, I get the following error: >"D:\Trash\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\Trash\AutoIT Scripts\Excel_Test.au3" D:\Trash\AutoIt3\Include\Excel.au3 (451) : ==> The requested action with this object has failed.: $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value = $sValue $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn)^ ERROR >Exit code: 1 Time: 3.029 I hope someone of you guys can help me with this. The format of the .ini file is like in the following: ["Some characters1"] "Number1"="Http Link1" "Number2"="Http Link2" ... ["Some characters2"] "Number3"="Http Link3" "Number4"="Http Link4" and so on... and the Excel output is: | Col 1 | Col 2 | Col3 | Row 1 |"Some characters1" | "Number1" | "Number2" | Row 2 |"Some characters2" | "Number3" | "Number4" | and so on... Best regards, Luciano
-
Thanks for the reply EDIT:// After some debugging of the code, I've got the following piece of code, I am on the way to the solution As of now it writes down correctly the Sector Names, now I have to learn a bit how to iniread all the values/keys inside sectors #include <Excel.au3> #include <Array.au3> $oExcel=ObjCreate("Excel.Application") $oExcel.Visible=0 $oExcel.WorkBooks.Open("D:\Trash\AutoIT Scripts\Database_S8.xls") If @error=1 Then ConsoleWrite("Error! - Unable to Create the Excel Object!"& @CRLF) ElseIf @error=2 Then ConsoleWrite("Error! - File does not exist!" & @CRLF) EndIf Global $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) ConsoleWrite("Read Array"&@CRLF) Global $iLastUsed =0, $iNextRow=0, $i=0, $var[10000] $var=IniReadSectionNames("Database.ini") _ArrayDisplay($var) For $i=1 To Ubound($var) -1 For $n = Ubound($avData) -1 to 1 Step -1 If StringStripWS($avData[$n],8) <> "" Then $iLastUsed = $n ExitLoop EndIf Next If $iLastUsed Then $iNextRow = $iLastUsed+1 Else $iNextRow=1 EndIf _ExcelWriteCell($oExcel,$var[$i],$iNextRow,1) ConsoleWrite("Trovato ultima riga:"& $iNextRow&@CRLF) $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) Next _ExcelBookSave($oExcel) _ExcelBookClose($oExcel)
-
Try this: $var=@MDAY&@MON&@YEAR&@HOUR6@MIN&@SEC ConsoleWrite($var & @CRLF) It should work the way you asked.
-
Problem has been solved, topic can be closed. For your info, the source code to the solution of my problem: #include <Excel.au3> #include <Array.au3> $oExcel=ObjCreate("Excel.Application") $oExcel.Visible=1 $oExcel.WorkBooks.Open("D:\Trash\AutoIT Scripts\Database_S8.xls") If @error=1 Then ConsoleWrite("Error! - Unable to Create the Excel Object!"& @CRLF) ElseIf @error=2 Then ConsoleWrite("Error! - File does not exist!" & @CRLF) EndIf Global $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) Global $iLastUsed =0, $iNextRow=0, $i=0, $var[10000] $var=IniReadSectionNames("Database.ini") For $i=1 To $var[0] _ExcelWriteCell($oExcel,$var[$i],$i,1) $var2=IniReadSection("Database.ini",$var[$i]) For $x=1 to $var2[0][0] _ExcelWriteCell($oExcel,$var2[$x][0],$i,$x+2) Next $avData = _ExcelReadArray($oExcel,1,1,1000,1,1) Next _ExcelBookSave($oExcel) _ExcelBookClose($oExcel) Hi guys,I have a .ini file that is "Updated" by a function every minute or so and what I need to do (With a separate function) is to read the entire .ini file and export it's content to an Excel for a better looking style and data managing, without overwriting cell format. (For example, if A1 cell is formatted with green background, the function should not change that colour) So that I can leave the .ini updating like it is doing at the moment, and every so often generate an Excel report of what's inside it. The composition of my .ini file is like in the following: [(ValueA|ValueA)] xx/xx=httplink -> All these values are different from each other xx/xx=httplink xx/xx=httplink [(ValueB|ValueB)] yy/yy=httplink yy/yy=httplink yy/yy=httplink And so on... I need to have my Excel file indicized by the Main Valour, so that it will come out in something similar to this: 1 | 2 | 3 | 4 -> ... 12347 A (ValueA|ValueA) | xx/xx | xx/xx | xx/xx -> ... xx/xx B (ValueB|ValueB) | yy/yy | yy/yy | yy/yy -> ... yy/yy EDIT:// I have, after some research and tries, finally come to a solution , working exactly as I meant. I'll post here the source, if anyone in future will look for something like this =)
-
Help with _IE and table formatting
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
Probably I expressed myself wrong, I said messed up, because I intended to have those numbers to be separate. I would be satisfied just to extract separately from everything else the final reference "202/480" I will try to get around this by parsing with:_IEBodyReadHTML and _StringBetween Hope I will come out with something working good And thanks Dale for the reply, really appreciated it and cleared one point out for me =) Edit: I will get my hands again on this piece of code from Monday, I take a rest during the weekend -
Help with _IE and table formatting
r3dbull replied to r3dbull's topic in AutoIt General Help and Support
It won't let me Edit this post, don't know why... By the way the interested part of source code in the web page for the "Bottino:" numbers in the table does look like this: <th>Bottino</th> <td colspan="10"> <div class="res"><img class="r1" src="img/x.gif" alt="Legno" title="Legno">58 | <img class="r2" src="img/x.gif" alt="Argilla" title="Argilla">59 | <img class="r3" src="img/x.gif" alt="Ferro" title="Ferro">45 | <img class="r4" src="img/x.gif" alt="Grano" title="Grano">40</div><div class="carry"><img class="car" src="img/x.gif" alt="porta" title="porta">202/480</div> -
You can try to use the window info tool as said above, but it actually doesn't work correctly for every GUI software, just test it. =)
-
Thanks Mat for your reply, I adjusted the above code for Skris if he would like to test it.