All Activity

This stream auto-updates   

  1. Past hour
  2. Look in the Scite Help file, under #autoit3wrapper settings. You can set the version of the compiled exe there.
  3. Something like? : $Body = "computername is " & @computername & "<br>username is " & @username Jos
  4. This is so nice! Don't know why this wasn't well viewed before.
  5. Today
  6. I figured out what I was doing wrong here. I had to add in the logon flag as a 2 after the $sPassword variable. Once I did that it processed successfully even with MMC and DSA.msc defined. So basically I changed below: RunAs($TargetUsername, $TargetDomain, $TargetPassword, 2, 'C:\Windows\System32\mmc.exe "C:\Windows\System32\dsa.msc"', "", @SW_SHOWMAXIMIZED) Hope this helps someone else.
  7. OK, got it: $printopt = EnvGet("KC2ST_PRINTOPT") MsgBox(262144, 'Test', 'Current value of KC2ST_PRINTOPT is ' & $printopt) $printopt = MsgBox(4097, "choose option", "ok to print, cancel to skip") If ($printopt = 2) Then $printopt = 0 Run (@ComSpec & " /c " & 'SETX KC2ST_PRINTOPT ' & $printopt, "", @SW_HIDE) This sets it for all future sessions, but not the current one. That's OK, as during the current session I still have the updated value in the $printopt variable; I don't have any other external programs needing to access it. If I needed the environment variable to be set for the current session, I could use SetEnv or the command line SET in addition to SETX, but I don't. Interestingly (but unsurprisingly), if I run the script repeatedly from SciTE, it doesn't work as I guess it's the same session, but when compiled it works as it should. It does stay persistent even after restarting the computer (since SETX puts it in the registry), but I'd rather have that than not remember it at all. Given that, I guess there's no advantage to doing it this way over putting it in an ini file or other registry key, but I have it this way and it works, so I'm not going to worry about it.
  8. I converted your file to a dll file using Resource Hacker and it works fine.
  9. That would also work but it would reflect the file time/date, not the version of the script. I guess without manually entering it in there nothing going to work. It would be nice if Wrapper had option to add Ver:3.3.1.2 or what ever directly into the file as a variable. That would really help.
  10. There are 6 icons in file, i would prefer to use 1 file instead of 6. I just added icons to res file with Resource hacker, it shouldnt be corrupted.
  11. Or you use 4 as value for the flag parameter of stringregexp. Then you get a Array-In-Array Structure which can be easily converted into a 2D-Array. For example with such a function: ; #FUNCTION# ====================================================================================== ; Name ..........: __ArrayAinATo2d() ; Description ...: Convert a Arrays in Array into a 2D array ; Syntax ........: __ArrayAinATo2d(ByRef $A) ; Parameters ....: $A - the arrays in array which should be converted ; Return values .: Success: a 2D Array build from the input array ; Failure: False ; @error = 1: $A is not an 1D array ; = 2: $A is empty ; = 3: first element is not aa array ; Author ........: AspirinJunkie ; ================================================================================================= Func __ArrayAinATo2d(ByRef $A) If UBound($A, 0) <> 1 Then Return SetError(1, UBound($A, 0), False) Local $N = UBound($A) If $N < 1 Then Return SetError(2, $N, False) Local $u = UBound($A[0]) If $u < 1 Then Return SetError(3, $u, False) Local $a_Ret[$N][$u] For $i = 0 To $N - 1 Local $t = $A[$i] If UBound($t) > $u Then ReDim $a_Ret[$N][UBound($t)] For $j = 0 To UBound($t) - 1 $a_Ret[$i][$j] = $t[$j] Next Next Return $a_Ret EndFunc ;==>__ArrayAinATo2d Or you work directly with the Array-In-Array because there is not much difference in the use.
  12. @UEZ WOW! This is exactly what i need! Why a such good and awesome UDF wasn't well viewed?? I'm justing having some problemns trying to use the function "_PK_ExtractPacketData" to read the data(image) from the packeged file and put i't on a GUI. I'm getting this error: $PK_ERROR_INVALID_PARAMETER (7)... don't know why. This function stores the data into a buffer, i think i'm calling it wrongly ; #FUNCTION# ==================================================================================================================== ; Name...........: _PK_ReadPacketData ; Description....: Reads a data from the "Data" section of the packet to the specified memory buffer. ; Syntax.........: _PK_ReadPacketData( $hPackage, $iPacket, $pBuffer, $iBytesToRead ) ; Parameters.....: $hPackage - A handle to the package. To obtain the handle, call the _PK_Create() or _PK_Open() function. ; $iPacket - A unique 64-bit packet identifier (ID) whose data should be read. Alternatively, you can specify the ; 1-based sequence number of the packet within a package. In this case, it should be a negative ; number, for example (-1), (-2), etc. ; $pBuffer - A pointer to a memory block (buffer) that receives the read data. You must allocate the ; buffer before call the function. The length of the buffer must not be less than the number ; of bytes that is to be read. ; $iBytesToRead - The maximum number of bytes to be read from the "Data" section of the packet. ; Return values..: Success - The number of bytes that has been actually read. ; Failure - 0 and sets the @Error flag to one of the following values: ; ; $PK_ERROR_NOT_FOUND (1) ; $PK_ERROR_INVALID_HANDLE (2) ; $PK_ERROR_INCOMPATIBLE_VERSION (4) ; $PK_ERROR_INSUFFICIENT_BUFFER (5) ; $PK_ERROR_INVALID_PARAMETER (7) ; $PK_ERROR_UNEXPECTED (9) ; ; Author.........: Yashied ; Modified.......: ; Remarks........: Unlike the _PK_ExtractPacketData() function that reads data entirely, the _PK_ReadPacketData() allows to read ; a part of the packet data. Moreover, this function does not perform decompression of the compressed data. In most ; cases this function is not necessary because the library does not provide decompression of the packet data ; independently, but may be useful for advanced users. ; ; To obtain the exact size of the "Data" section, call the _PK_GetPacketDataLength() function. ; ; Related........: _PK_AddPacket, _PK_AddPacketFromFile, _PK_ExtractPacketData, _PK_ExtractPacketDataToFile, _PK_Purge, _PK_RemovePacket ; Link...........: ; Example........: ; =============================================================================================================================== Func _PK_ReadPacketData($hPackage, $iPacket, $pBuffer, $iBytesToRead) Local $tPacket, $Data If Not $pBuffer Then Return SetError(7, 0, 0) EndIf $tPacket = __pk_EnumPackets($hPackage, Number($iPacket)) If @Error Then Return SetError(@Error, 0, 0) EndIf $Data = __pk_QueryPacket($hPackage, $tPacket) If @Error Then Return SetError(@Error, 0, 0) EndIf If Not _WinAPI_SetFilePointerEx($hPackage, $Data[0] + $Data[1], $FILE_CURRENT) Then Return SetError(9, 0, 0) EndIf If $iBytesToRead > $Data[2] Then $iBytesToRead = $Data[2] EndIf If Not __pk_ReadFile($hPackage, $pBuffer, $iBytesToRead) Then Return SetError(9, 0, 0) EndIf Return $iBytesToRead EndFunc ;==>_PK_ReadPacketData *****Just fond solution on the topic of the UDF.
  13. I had viewed other posts on Shell Execute and looked at the help file. Here is my question (here is what I have used): ShellExecute ( "Food.pdf" , "" ,"C:\My Files",$SHEX_PRINT ) I am misunderstand something on this. Is this to take the document straight to the printer with no intervention or user input? When using the above, the document opens on the screen where from there I could click the regular print request if I wanted to, but I was looking to avoid that part. I actually have the above in a print button on my control. It appears the above executes the same as ShellExecute ( "C:\My Files\Food.pdf " ). I never knew about the $SHEX_PRINT. Hobbyist
  14. hi, searching on the local copy can be a way to go, good idea, thanks! When someone calls, i have his number and then I want to find a callers name from the customer database of a crm system. Like a call monitor. The CRM Software only allows read access to the firebird DB by odbc. As the data is already there and can not be easily changed, i try my best to get useful results...
  15. Sorry RTFC, Can't get it to work. Changed what I thought might work and still getting nowhere... doh! This is even after the variable was declared as Global?! ; clip comment tail $newline=StringReplace($curline,"],[","], _" & @CRLF) Global $ilinebreaks01 = @extended ; write single line or multiline If StringLen($newline)<2048 or $ilinebreaks01>0 Then >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Program Files (x86)\AutoIt3\Include\codecrypter.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "C:\Program Files (x86)\AutoIt3\Include\MCF.au3" (2299) : ==> Variable used without being declared.: If StringLen($newline)<2048 or $ilinebreaks01>0 Then If StringLen($newline)<2048 or ^ ERROR - Don't know what to do... Please help lol!
  16. Sorry, wrong forum topic.
  17. @x_bennY instead of a DB try to use Just an idea and not tested.
  18. GUICtrlSetData($easyshare_input,GUICtrlRead($easyshare_input)&$Split3) Because if not, you write the last value on top of the previous one
  19. Not exactly what you are wanting, but have you looked into Chocolatey?
  20. Have you tried converting it to .ico? There might be some problems with the file
  21. Any other way to change autoit tray icon except TraySetIcon?
  22. Thanks, I tried to do this in my script. It works with consolewrite but doesn't work with Guictrlsetdata #region AUTOIT VARIABLES #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #endregion #region SCRIPT VARIABLES Global $outlook_input, $string,$Split1,$Split2,$Split3 #endregion #region GUI $GuiManager = GuiCreate("Logon Default User", 700, 420, -1, -1,$WS_POPUPWINDOW) #region FILE MENU $filemenu=GUICtrlCreateMenu('File') $convert_item=GUICtrlCreateMenuItem('Convert',$filemenu) $copy_item=GUICtrlCreateMenuitem('Copy',$filemenu) $exit_item=GUICtrlCreateMenuitem('Exit',$filemenu) #endregion #region LIST FROM OUTLOOK GUICtrlCreateGroup('', 5, 12, 690, 150) GUICtrlCreateLabel('LIST FROM OUTLOOK',10,25,680,20,$SS_CENTER) GUICtrlSetFont(-1, -1, 800, 0, "",1) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlCreateLabel('Please paste your recipients from Outlook in field below',10,45,680,20,$SS_CENTER) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $outlook_input=GUICtrlCreateInput("",20, 67, 660,80) #endregion #region LIST FOR EASYSHARE GUICtrlCreateGroup('', 5, 175, 690, 150) GUICtrlCreateLabel('LIST FOR EASYSHARE',10,185,680,20,$SS_CENTER) GUICtrlSetFont(-1, -1, 800, 0, "",1) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlCreateLabel('Please copy recipients below or click on button Copy',10,205,680,20,$SS_CENTER) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $easyshare_input=GUICtrlCreateInput("",20, 227, 660,80) #endregion #region BUTTONS $convertbutton=GuiCtrlCreateButton('Convert', 240, 360, 70, 20, $BS_DEFPUSHBUTTON) $copybutton=GuiCtrlCreateButton('Copy', 315, 360, 70, 20) $exitbutton=GuiCtrlCreateButton('Exit', 390, 360, 70, 20) #endregion #region BACKGROUND #endregion #endregion #region SCRIPT GuiSetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $exitbutton or $msg=$exit_item Then DirRemove(@TempDir&'\Logon_User_Lancel',1) ExitLoop EndIf If $msg = $convertbutton or $msg=$convert_item Then convert() EndIf WEnd #endregion #region FUNCTIONS Func convert() $string=GUICtrlRead($outlook_input) $Split1 = StringSplit($string, ';') for $1 = 1 To $Split1[0] $Split2 = StringSplit($Split1[$1], '<') For $2 = 1 To $Split2[0] If $2 = $Split2[0] Then ;~ ConsoleWrite(StringTrimRight($Split2[$2], 1)&';') $Split3=StringTrimRight($Split2[$2], 1)&';' GUICtrlSetData($easyshare_input,$Split3,"") EndIf Next Next EndFunc #endregion Need your help again Thanks
  23. @Hulubulu what are you trying to accomplish anyway? What kind of program are you trying to create?
  24. Yes, that would fix it. Odd though, I don't get that warning/error.
  25. I think you @Hulubulu can use the WinwaitActive() function.
  26. I have an HTML file (string) with a bunch of lines (Snippit here: https://pastebin.com/iTZqV818 ) I then gather the ROW NUMBER of each line that starts with "&nbsp;&nbsp". Next I would like to put all the results from StringRegExp on RowNum+1, into a new 2D array. I can make multiple 1D arrays ($aPaths and $aNames) Local $aData = FileReadToArray ( "C:\temp\spokane.html" ) ; Find all rows that start with "&nbsp;&nbsp;" Local $aFinds[0] For $i = 0 To UBound($aData)-1 If StringLeft($aData[$i],12) = "&nbsp;&nbsp;" Then _ArrayAdd($aFinds,$i) EndIf Next Local $iFirstLine = _ArrayMin($aFinds) Local $iLastLine = _ArrayMax($aFinds) + 2 ; Extract the useful info Local $sLine = "" Local $aLine = [3] Local $aPaths[0] Local $aNames[0] For $i = $iFirstLine To $iLastLine $aLine = StringRegExp($aData[$i+1], "<a href='(.+?)'.+(<\/a> )(.+)<BR>", 1) _ArrayAdd($aPaths,$aLine[0]) _ArrayAdd($aNames,$aLine[2]) $i = $i + 2 ; Increase to the next group Next _ArrayDisplay($aPaths) _ArrayDisplay($aNames) But I just can't figure out how to make a single 2D array with the parts. I would have thought with perhaps $aLine[0][2], putting something in the loop like _ArrayAdd($aNames,[$aLine[0],$aLine[2]]) would work... but no. I've searched Google, and these forums, but the results all seemed to deal with ONE line of data into a 2D array, or multiple lines into a 1D array. I'm looking for a way to put the results [0] and [2] into two columns, in one final array. (Picture $aPaths in column 1, and $aNames in column 2) Anyone care to give it a shot? I think I'm close, just don't know the right syntax. Thanks!
  1. Load more activity