joen0s Posted January 10, 2007 Share Posted January 10, 2007 Hi, i need some help with my script, i want to put the computername in a variable (sorry for my bad english) but i don't know how to do that. the purpose of the variable is to make it a a name for a text file. thnx greetz jeroen Link to comment Share on other sites More sharing options...
jvanegmond Posted January 10, 2007 Share Posted January 10, 2007 $ComputerName = @ComputerName ?? github.com/jvanegmond Link to comment Share on other sites More sharing options...
joen0s Posted January 10, 2007 Author Share Posted January 10, 2007 [$ComputerName = @ComputerName if fileexists("c:\inventarisatie.txt") then Exit else Run("everest.exe") EndIf WinWait("EVEREST Ultimate Edition 2006","",20) If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","") WinWaitActive("EVEREST Ultimate Edition 2006","") Send("{ALTDOWN}{ALTUP}rr") WinWait("Rapport Assistent - EVEREST","") If Not WinActive("Rapport Assistent - EVEREST","") Then WinActivate("Rapport Assistent - EVEREST","") WinWaitActive("Rapport Assistent - EVEREST","") Send("vvvk") ProcessWait("Bericht - EVEREST", 10) WinWait("Bericht - EVEREST","") If Not WinActive("Bericht - EVEREST","") Then WinActivate("Bericht - EVEREST","") WinWaitActive("Bericht - EVEREST","") Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{F4}{ALTUP}") WinWait("EVEREST Ultimate Edition 2006","") If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","") WinWaitActive("EVEREST Ultimate Edition 2006","") Send("{ALTDOWN}{F4}{ALTUP}") Run("notepad.exe") WinWait("Naamloos - Kladblok","") If Not WinActive("Naamloos - Kladblok","") Then WinActivate("Naamloos - Kladblok","") WinWaitActive("Naamloos - Kladblok","") Send("{CTRLDOWN}v{CTRLUP}{CTRLDOWN}s{CTRLUP}") WinWait("Opslaan als","") If Not WinActive("Opslaan als","") Then WinActivate("Opslaan als","") WinWaitActive("Opslaan als","") Send("c:\"$ComputerName".txt") Send("{ALTDOWN}{F4}{ALTUP}")N:\EVEREST Ultimate Edition\Inventarisatie.au3 (32) : ==> Error in expression.: Send("c:\"$ComputerName".txt") sorry get this error now :S but i has to use a different Computername every time so the computername of the pc itself en that has to be the filename for a text file.but now i get this error Link to comment Share on other sites More sharing options...
MadBoy Posted January 10, 2007 Share Posted January 10, 2007 WinWaitActive("Opslaan als","") Send("c:\" & $ComputerName & ".txt") Send("{ALTDOWN}{F4}{ALTUP}") Should help My little company: Evotec (PL version: Evotec) 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