Leaderboard
Popular Content
Showing content with the highest reputation on 03/27/2015 in all areas
-
Variables do not lose their content. You either assign another value to them or you try to access the variable outside of its scope.1 point
-
I think my proposal can be an "optional option" (additional configurable feature) inside ISN AutoIt Studio.1 point
-
@ Hassan11 1) I you are going to send the program to only 3 people. I would change the built-in program... A) Test for internet service. send you an email with users info and email address C) Based on the info, send an encrypted code to that person to open the program. ( If you receive an email from anonymous, don't send a code) 2) Yes, you would need to change the code for your payment system. 3) Test.com may be your answer to this dilemma. 4) the built-in email system is from Jos - you can view his thread for more info on how it works. REMEMBER - I do not customize this free code for people.... But, I will try to answer questions... When I can. Good Luck 8)1 point
-
1) done 2) Sounds good.. 3) roger 4) Here I´m not really sure what youre meaning. If its enabled the ISN should list Variables in the Autocomplete Liste when you press $ Key.1 point
-
Please have a look at RunWait with @ComSpec like : RunWait(@ComSpec & ' /c ' & 'netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes remoteip=157.60.0.1,172.16.0.0/16,LocalSubnet profile=private')1 point
-
1 point
-
Before someone posts some outdated code, why not use _WinAPI_DragAcceptFiles() and _WinAPI_DragQueryFileEx()? Check the help file.1 point
-
1 point
-
1) The money should change based on YOUR PayPal account link from your country. 2) The system reads the Paypal page showing it has been paid, Then, the registration email is sent to the customer and you. However, if you are in a different country with a different language, you may need to change the code to read the "paid paypal page" in your language. 3) First, be sure you are using the free version, the paid version is encrypted. Second, you will need to make the appropriate changes for the email sent and the contents. I do not make/customize these type of code changes. Good Luck 8)1 point
-
Enterprise Password Management
SorryButImaNewbie reacted to water for a topic
I know you do not look for KeePass but ... We use KeePass as an enterprise wide password manager. We "connect" password files to store the passwords on department, team and activity level. The kdb files are stored on a network drive for easy access. Not too complex to manage but secure and cheap.1 point -
Initial Workstation settings script?
SorryButImaNewbie reacted to JLogan3o13 for a topic
Why are you trying to script out all of these configuration changes instead of just configuring the machine the way you want, add a default profile, and then sysprep it? Much easier method.1 point -
Hello community, here is my script integration library ScriptX. With this library is it very easy possible to integrate AutoIt inside SAPs programming language ABAP. Here an ABAP example: "-Begin----------------------------------------------------------------- Program ZSCRIPTX. "-Constants--------------------------------------------------------- Constants CrLf(2) Type c Value %_CR_LF. Constants SW_SHOWNORMAL Type i Value 1. "-Variables--------------------------------------------------------- Data oScriptX Type OLE2_OBJECT. Data Buffer Type String Value ''. Data WorkDir Type String Value ''. Data FileName Type String Value ''. Data rc Type i Value 0. "-Macros------------------------------------------------------------ Define _. Concatenate Buffer &1 CrLf Into Buffer. End-Of-Definition. Define Flush. Call Function 'AC_SYSTEM_FLUSH' Exceptions Others = 1. End-Of-Definition. "-Main-------------------------------------------------------------- Create Object oScriptX 'ScriptX'. If sy-subrc <> 0 Or oScriptX-Handle = 0 Or oScriptX-Type <> 'OLE2'. Call Function 'ZSCRIPTXDLL'. Create Object oScriptX 'ScriptX'. EndIf. If sy-subrc = 0 And oScriptX-Handle > 0 And oScriptX-Type = 'OLE2'. Call Method Of oScriptX 'About'. Flush. Call Function 'ZAUTOIT3EXE'. "-AutoIt Script begin--------------------------------------------------- _ 'MsgBox(0, "AutoIt", "Version " & @AutoItVersion)'. "-AutoIt Script end----------------------------------------------------- Call Method cl_gui_frontend_services=>get_sapgui_workdir Changing SAPWORKDIR = WorkDir Exceptions Others = 1. Concatenate WorkDir '\Version.au3' Into FileName. Flush. Call Method Of oScriptX 'WriteFile' Exporting #1 = FileName #2 = Buffer. Flush. Call Method Of oScriptX 'Shell' = rc Exporting #1 = 'AutoIt3.exe' #2 = 'Version.au3' #3 = SW_SHOWNORMAL #4 = 1. Flush. Free Object oScriptX. EndIf. "-End------------------------------------------------------------------- Good integration. Cheers Stefan1 point
-
Hello community, here is an example code of a server application for an SAP system in AutoIt language. My problem is, that this AutoIt example crashs after the first function call of ABAPCall from an ABAP report. I try two methods: Use DllCallbackGetPtrUse CreateThread and get the address of the thread.But both methods crashs at the same code position, look at the example below. Is there any other way to use this kind of multithreading? Thanks for hints. Cheers Stefan ;-Begin----------------------------------------------------------------- ;-Directives---------------------------------------------------------- AutoItSetOption("MustDeclareVars", 1) ;-Constants----------------------------------------------------------- Const $RFC_OK = 0 Const $RFC_RETRY = 14 ;-Variables----------------------------------------------------------- Dim $SAP, $ABAPCall, $ptrABAPCall, $hDesc, $conPar[3] Dim $ptrConPar[3], $ConParPtr, $i, $rc, $hCon ; Dim $hThread ;-Function CreateThread----------------------------------------------- Func CreateThread($Handle) Local $Ret $Ret = DllCall("kernel32.dll", "handle", "CreateThread", "ptr", 0, _ "dword", 0, "long", DllCallbackGetPtr($Handle), "ptr", 0, _ "long", 0, "int*", 0) Return $Ret[0] EndFunc ;-Function GetThreadAddr---------------------------------------------- Func GetThreadAddr($hThread) Local $ThreadAddr = DllStructCreate("ptr") DllCall("NTDLL.dll", "long", "NtQueryInformationThread", _ "handle", $hThread, "long", 9, "ptr", _ DllStructGetPtr($ThreadAddr), "ulong", 4, "ulong*", 0) Return Number(DllStructGetData($ThreadAddr, 1)) EndFunc ;-Function OutputDebugString------------------------------------------ Func OutputDebugString($OutputString) Local $strOut = String($OutputString) DllCall("kernel32.dll", "none", "OutputDebugStringW", "wstr", _ $strOut) EndFunc ;-Function ABAPCall--------------------------------------------------- Func ABAPCall() MsgBox(0, "", "Ja") Return $RFC_OK ;-Important hint-------------------------------------------------- ;- ;- Program crashs here, because AutoIt is not able to use multi ;- threading with SAP NetWeaver RFC library ;- ;----------------------------------------------------------------- EndFunc ;-Main---------------------------------------------------------------- $SAP = ObjCreate("COMNWRFC") If IsObj($SAP) Then $ABAPCall = DllCallbackRegister("ABAPCall", "long", "") $hDesc = $SAP.RfcCreateFunctionDesc("ABAPCall") If $hDesc And $ABAPCall Then ;-Define RFC_CONNECTION_PARAMETER structures-------------------- For $i = 0 To 2 $conPar[$i] = DllStructCreate("wchar name[16];wchar value[16]") Next ;-Set RFC_CONNECTION_PARAMETER---------------------------------- DllStructSetData($conPar[0], "name", "program_id") DllStructSetData($conPar[0], "value", "AUTOITSERVER") DllStructSetData($conPar[1], "name", "gwhost") DllStructSetData($conPar[1], "value", "ABAP") DllStructSetData($conPar[2], "name", "gwserv") DllStructSetData($conPar[2], "value", "sapgw00") ;-Switch RFC_CONNECTION_PARAMETER strings to pointers----------- $ptrConPar = DllStructCreate("ptr;ptr;ptr;ptr;ptr;ptr") DllStructSetData($ptrConPar, 1, DllStructGetPtr($conPar[0], "name")) DllStructSetData($ptrConPar, 2, DllStructGetPtr($conPar[0], "value")) DllStructSetData($ptrConPar, 3, DllStructGetPtr($conPar[1], "name")) DllStructSetData($ptrConPar, 4, DllStructGetPtr($conPar[1], "value")) DllStructSetData($ptrConPar, 5, DllStructGetPtr($conPar[2], "name")) DllStructSetData($ptrConPar, 6, DllStructGetPtr($conPar[2], "value")) $ptrABAPCall = Number(DllCallbackGetPtr($ABAPCall)) ;-Alternative----------------------------------------------------------- ; ; $hThread = CreateThread($ABAPCall) ; If $hThread Then ; $ptrABAPCall = GetThreadAddr($hThread) ; If $ptrABAPCall Then ; ;----------------------------------------------------------------------- $rc = $SAP.RfcInstallServerFunction("", $hDesc, $ptrABAPCall) If $rc = $RFC_OK Then $ConParPtr = Number(DllStructGetPtr($ptrConPar)) $hCon = $SAP.RfcRegisterServer($ConParPtr, 3) If $hCon Then While $rc = $RFC_OK Or $rc = $RFC_RETRY $rc = $SAP.RfcListenAndDispatch($hCon, 1) Select Case $rc = $RFC_OK OutputDebugString("RFC_OK") Case $rc = $RFC_RETRY OutputDebugString("RFC_RETRY") EndSelect Sleep(256) Wend EndIf EndIf $SAP.RfcDestroyFunctionDesc($hDesc) DllCallbackFree($ABAPCall) ; DllCall("kernel32.dll", "boolean", "CloseHandle", _ ; "handle", $hThread) ; EndIf ; EndIf EndIf $SAP = 0 EndIf ;-End-------------------------------------------------------------------1 point