Jump to content

FourLC

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by FourLC

  1. I've the same problem but i found bad definitions in the file "au3.properties" ! This lines are write in the file : comment.box.start.au3=#CS comment.box.middle.au3= comment.box.end.au3=#CE But it doesn't work because ''comment.box.middle.au3=" MUST NOT be empty ! Write 'comment.box.middle.au3=;" and CTRL+MAJ+B work now ! Cordialy
  2. @Jos GREAT !!! I delete the subkey "\UserChoice", hit F5 to reactivate registry and .......it's WORKS ! I've the Right click Option "Open, compile script, compile with options, edit....etc...) AND my template (in "C:\Windows\ShellNew" like "AdmiralAlkex" remember me) WORKS TOO ! Thanks a lot ! Cordialy Ps: Excuses my bad english !
  3. You're right, I too have a "Template.au3"in "C: \ Windows \ ShellNew" but I have no right click -> New -> AutoIt3 so I can not test the good directory models. For Jos, me, in "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3\Userchoice", i have nnot a "OPEN WITH" option. cordially
  4. Hello, Like msmith11, i've installed autoit 3.3.6.1 and i have not autoit submenus on right click. Also, the "Template.au3" doesn't work ! The template for AutoIt doesn't appear when i right clear in a directory ! And for the least "bug" , when i type "shell:templates" in the windows "run menu" command, i not see the normal AutoIt templates "Templates.au3". I have copy my personnal template who run on XP but .....it's no working on seven ! AutoIt3 and Seven ultimate are incompatibles, maybe ?!? Thanks for AutoIt, THE great scripting & dev language !!
  5. Hello, I've the same problem with google calendar and after 20 days of research, i've recently found THE solution. This solution work with google calendar and google feeder. The librairie "_XMLDOMWrapper" use version 6 of Msxml2 ("Msxml2.DOMdocument.6.0"), but version 4,5 and 6 of MsXml are compliant with W3C. Version 1, 2 and 3 are compliant with....microsoft Xml specifications only ;-) and don't need namespaces. So for version compliant with W3C you MUST declare and use NAMESPACES. Your code work if you write : $debugging = True $iRET = _XMLFileOpen(@ScriptDir & "\fichier.xml",'xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"') ConsoleWrite("$iRET = " & $iRET & "; @error = " & @error & "; @extended = " & @extended & @LF) $retval = _XMLGetPath('//atom:feed/atom:entry') ConsoleWrite("$retval = " & $retval & "; @error = " & @error & "; @extended = " & @extended & @LF) If IsArray($retval) Then _ArrayDisplay($retval)It's work with my version AutoIt3.3.4.0 of autoit, on my computer :See my console. >Running:(3.3.4.0):C:\PF\AutoIt3\autoit3.exe "C:\Users\TOLA\Downloads\0Progs\0Autoit\0DATA\GCalendar\LireXml.au3" $iRET = 1; @error = 0; @extended = 0 GetPath list length:1 parent feed parent #document Path node> /feed/entry $retval = ; @error = 0; @extended = 0 Be carefully, i've add 'xmlns:atom="http://www.w3.org/2005/Atom"......' for namespaces declaration and "$retval = _XMLGetPath('//atom:feed/atom:entry')" for xml tag prefix. I'm not sure for XPath, maybe someone can help us for make good XPath research !?!? You must take the same namespaces found in the root tag, the "feed" tag in Google Data, but just take xmlns attributs. Excuse my poor english .
  6. Is what you want ?? Comments are in french but easy to understand !! CODE AutoItSetOption("MustDeclareVars",1) Dim $oConn1 Dim $oRS1 ;For Stored Proc test ! Dim $oRS2 ; For Sql Query test ! Dim $server = "."; local server Dim $user = "sa";The user Dim $pass = "password";The ......... password !!! Dim $dbname = "NorthWind";the database Dim $adOpenForwardOnly = 0 ;Valeur par défaut. Utilise un curseur à défilement en avant. Identique à un curseur statique mais ne permettant que de faire défiler les enregistrements vers l'avant. Ceci accroît les performances lorsque vous ne devez effectuer qu'un seul passage dans un Recordset. Dim $adOpenKeyset = 1 ;Utilise un curseur à jeu de clés. Identique à un curseur dynamique mais ne permettant pas de voir les enregistrements ajoutés par d'autres utilisateurs (les enregistrements supprimés par d'autres utilisateurs ne sont pas accessibles à partir de votre Recordset). Les modifications de données effectuées par d'autres utilisateurs demeurent visibles. Dim $adOpenDynamic = 2 ;Utilise un curseur dynamique. Les ajouts, modifications et suppressions effectués par d'autres utilisateurs sont visibles et tous les déplacements sont possibles dans le Recordset à l'exception des signets, s'ils ne sont pas pris en charge par le fournisseur. Dim $adOpenStatic = 3 ;Utilise un curseur statique. Copie statique d'un jeu d'enregistrements qui permet de trouver des données ou de générer des états. Les ajouts, modifications ou suppressions effectués par d'autres utilisateurs ne sont pas visibles. Dim $adOpenUnspecified = -1 Dim $adLockBatchOptimistic =4 ;Mise à jour par lot optimiste. Obligatoire en mode de mise à jour par lots. Dim $adLockOptimistic =3 ;Verrouillage optimiste, un enregistrement à la fois. Le fournisseur utilise le verrouillage optimiste et ne verrouille les enregistrements qu'à l'appel de la méthode Update. Dim $adLockPessimistic =2 ;Verrouillage pessimiste, un enregistrement à la fois. Le fournisseur assure une modification correcte des enregistrements, et les verrouille généralement dans la source de données dès l'édition. Dim $adLockReadOnly =1 ;Enregistrements en lecture seule. Vous ne pouvez pas modifier les données. Dim $adLockUnspecified =-1 Dim $adCmdUnspecified = -1 ;Ne spécifie pas l'argument type de la commande. Dim $adCmdText = 1 ;CommandText correspond à la définition textuelle d'une commande ou d'un appel de procédure stockée. Dim $adCmdTable = 2 ;CommandText correspond au nom de la table dont les colonnes sont toutes renvoyées par une requête SQL générée en interne. Dim $adCmdStoredProc = 4 ;CommandText correspond au nom d'une procédure stockée. Dim $adCmdUnknown = 8 ;Valeur par défaut. Indique que le type de commande spécifié dans la propriété CommandText n'est pas connu. Dim $adCmdFile = 256 ;CommandText correspond au nom de fichier d'un Recordset stocké de façon permanente. Dim $adCmdTableDirect = 512 ;CommandText correspond au nom d'une table dont les colonnes sont toutes renvoyées. Dim $IntRetour = 0 Dim $intNbLignes = 0 ;~ Dim $Sepa = String(@TAB); for having tab for separator ! Dim $Sepa = ";" ;like CSV Dim $strConnexion = "DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $dbname & ";uid=" & $user & ";pwd=" & $pass & ";" $oConn1 = ObjCreate("ADODB.Connection") $oConn1.open($strConnexion) ;For a test of a store proc in Master database of Micr@s@ft MsSql2000 Dim $strSqlQuerySP = "sp_oledb_database" ; a MsSql2000 stored proc of master database ! $oRS1 = ObjCreate("ADODB.Recordset") $oRS1.open($strSqlQuerySP,$oConn1,$adOpenKeyset,$adLockOptimistic,$adCmdStoredProc) $intNbLignes = $oRS1.recordCount $oRS1.MoveFirst For $i = 0 To $intNbLignes -1 ConsoleWrite($oRS1.Fields.Item(0).value & @CRLF) $oRS1.MoveNext ; DON'T FORGET THIS OR CRASH...!!! Next $oRS1.close ;For a test of a simple text Query Dim $strSqlQuerySelect = "select * from customers" $oRS2 = ObjCreate("ADODB.Recordset") $oRS2.open($strSqlQuerySelect,$oConn1,$adOpenStatic,$adLockOptimistic,$adCmdText) $intNbLignes = $oRS2.recordCount ;i re-use $intNbLignes ! ;For getting Fields Header Names... For $j = 0 To $oRS2.Fields.count -1 ConsoleWrite($oRS2.Fields($j).name & $Sepa) Next ConsoleWrite (@CRLF);to rewind For $i = 0 To $intNbLignes -1 ; or "For $i = 0 To ($oRS2.recordCount - 1)" if you want For $j = 0 To $oRS2.Fields.count -1 ConsoleWrite($oRS2.Fields($j).value & $Sepa) Next ConsoleWrite (@CRLF);to begin the next line $oRS2.MoveNext ; DON'T FORGET THIS OR CRASH...!!! Next $oRS2.close $oConn1.close AdoAdox3MSSql2000.au3
  7. Maybe this help you ...... AutoItSetOption("MustDeclareVars",1) Dim $oConn1 Dim $oRS1 Dim $server = "."; local server Dim $user = "sa";The user Dim $pass = "password";The ......... password !!! Dim $dbname = "NorthWind";the database Dim $adCmdUnspecified = -1 Dim $adCmdText = 1 Dim $adCmdTable = 2 Dim $adCmdStoredProc = 4 Dim $adCmdUnknown = 8 Dim $adCmdFile = 256 Dim $adCmdTableDirect = 512 Dim $adOpenForwardOnly = 0 Dim $adOpenKeyset = 1 Dim $adOpenDynamic = 2 Dim $adOpenStatic = 3 Dim $adOpenUnspecified = -1 Dim $adLockBatchOptimistic =4 Dim $adLockOptimistic =3 Dim $adLockPessimistic =2 Dim $adLockReadOnly =1 Dim $adLockUnspecified =-1 Dim $strConnexion = "DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $dbname & ";uid=" & $user & ";pwd=" & $pass & ";" Dim $strSqlQuery = "sp_oledb_database" ; a MsSql2000 stored proc of master database ! Dim $IntRetour = 0 Dim $intNbLignes = 0 $oConn1 = ObjCreate("ADODB.Connection") $oRS1 = ObjCreate("ADODB.Recordset") $oConn1.open($strConnexion) $oRS1.open($strSqlQuery,$oConn1,$adOpenKeyset,$adLockOptimistic,$adCmdStoredProc) $intNbLignes = $oRS1.recordCount $oRS1.MoveFirst For $i = 0 To $intNbLignes -1 ConsoleWrite($oRS1.Fields.Item(0).value & @CRLF) $oRS1.MoveNext Next $oRS1.close $oConn1.close AdoAdox2MSSql2000.au3
  8. well, well, how to say......Just : excuse me...you're right and i'm very confuse !! One year ago, i'm walking through the web and i've found this trick (in french) : Désactiver les services inutiles But, after a year, i've forgot this and my service "secondary connexion" ("Connexion secondaire") was disconnected ! Excuse me for this ! It's work fine ! Thanks a lot ...... FourLC
  9. Thank for our help ! But now i've an other error with the windows error code "1058" (In french : "Le service ne peut pas être démarré parce qu'il est désactivé ou qu'auncun périphérique activé ne lui est associé") ! I'm not sure but i've a PC with "Home XP" ("Windows Edition familliale") , not the "Pro" version of XP ! Maybe on "Home edition" of XP , we can't impersonate user or create process with "CreateProcessWithLogonW" !? I've modified my "Home XP" for having ACL on directory and other "Pro" features but it's not enough to impersonate !! Thanks for reply FourLC
  10. Hello, This little code don't work...why ? CODEopt("RunErrorsFatal",0) opt("MustDeclareVars",0) ;For 'CreateProcessWithLogonW' -> dwLogonFlags Global Const $LOGON_WITH_PROFILE = 0x1 Global Const $LOGON_NETCREDENTIALS_ONLY = 0x2 ;For'CreateProcessWithLogonW' -> dwCreationFlags Global Const $CREATE_DEFAULT_ERROR_MODE = 0x4000000 ;Les initialisations Dim $STARTUPINFO = "",$si="" Dim $PROCESS_INFORMATION ="",$pi="" ; $STARTUPINFO &= "dword cb;long lpReserved;long lpDesktop;long lpTitle;dword dwX;dword dwY;" $STARTUPINFO &= "dword dwXSize;dword dwYSize;dword dwXCountChars;dword dwYCountChars;" $STARTUPINFO &= "dword dwFillAttribute;dword dwFlags;short wShowWindow;short cbReserved2;long lpReserved2;" $STARTUPINFO &= "long hStdInput;long hStdOutput;long hStdError" $si = DllStructCreate($STARTUPINFO) If $si = 0 Then msg(@error) Exit EndIf DllStructSetData($si,"cb",DllStructGetSize($si)) $ptrSI = DllStructGetPtr($si) ;~ Msg($ptrSI) $PROCESS_INFORMATION &= "long hProcess;long hThread;long dwProcessId;long dwThreadId" $pi = DllStructCreate($PROCESS_INFORMATION) If $pi = 0 Then msg(@error) Exit EndIf $ptrPI = DllStructGetPtr($pi) ;~ Msg($ptrPI) $arrRet = DllCall("advapi32.dll","long","CreateProcessWithLogonW", _ "wstr","user", _ "wstr","domain", _ "wstr","password", _ "dword",$LOGON_WITH_PROFILE, _ "wstr","", _ "wstr","c:\windows\notepad.exe", _ "dword",$CREATE_DEFAULT_ERROR_MODE, _ "ptr",0, _ "ptr",0, _ "ptr",$ptrSI, _ "ptr",$ptrPI) If Not @error and $arrRet[0]<>0 Then $arrRet = DllCall("kernel32.dll", "int", "CloseHandle", "ptr",DllStructGetPtr($pi,"dwProcessId")) If Not @error and $arrRet[0]<>0 Then Msg("Return of 'CloseHandle' : "& $arrRet[0]) Else Msg("Error (CloseHandle): "& @error) Msg("Return of 'CloseHandle' : "& $arrRet[0]) Exit 1 EndIf Else Msg("Error (CreateProcessWithLogonW) : "& @error) Msg("Return of 'CreateProcessWithLogonW' : "& $arrRet[0]) Exit 2 EndIf Exit 0 ; Func Msg($letexte) MsgBox(0x43000,"Message...",$letexte) EndFunc can anyone gelp me ? Yes i know the function RunAsSet(xx,xx.... etc...) but i want know why this function not work with AutoIt3 !!? Thanks... FourLC CPWLW.au3
×
×
  • Create New...