|
From: Boris Skoblo on 15 Jan 2007 08:31 Hi All, please help me convert following VBscript code to Perl code ............................................................................................... strLDAP = "LDAP://CN=test,OU=users,DC=tech,DC=com" set usr = GetObject(strLDAP) Wscript.echo usr.TerminalServicesWorkDirectory Wscript.echo usr.TerminalServicesInitialProgram usr.TerminalServicesInitialProgram= "cmd.exe" usr.TerminalServicesWorkDirectory= "D:\path" usr.SetInfo WScript.echo usr.TerminalServicesInitialProgram Wscript.echo usr.TerminalServicesWorkDirectory Can anyone help? Thanks!
From: Henry Law on 15 Jan 2007 14:03 Boris Skoblo wrote: > Hi All, > > please help me convert following VBscript code to Perl code > ............................................................................................... > strLDAP = "LDAP://CN=test,OU=users,DC=tech,DC=com" Boris, the people who hang out here do so because they know Perl. The chances of finding one who knows VB-thing are very small. The chances of finding one of those who is also prepared to do your work for you from scratch is even smaller ... approaching zero. Hint: have a go at getting some of this into Perl. Post with your difficulties and people will be much more willing to help. Oh, and if you're posting VB then make sure you tell us what it does. Posting guidelines appear here very regularly; Google for them if you need to. They are useful; my advice would be to follow them for your next post here. -- Henry Law Manchester, England
From: Tad McClellan on 15 Jan 2007 15:37 Boris Skoblo <borsk(a)technion.ac.il> wrote: > please help me convert following VBscript code to Perl code ^^^^^^^ [snip VB code ] > Can anyone help? Sure! What part are you stuck on? Can anyone write it for you? No, only some people can write it for you. Will anyone write it for you? Probably not. Show us the Perl code you have so far, we cannot "help" with your Perl code if you do not show us your Perl code. -- Tad McClellan SGML consulting tadmc(a)augustmail.com Perl programming Fort Worth, Texas
From: gf on 16 Jan 2007 15:55 Boris Skoblo wrote: > Hi All, > > please help me convert following VBscript code to Perl code > .............................................................................................. > strLDAP = "LDAP://CN=test,OU=users,DC=tech,DC=com" > set usr = GetObject(strLDAP) > > Wscript.echo usr.TerminalServicesWorkDirectory > Wscript.echo usr.TerminalServicesInitialProgram > > usr.TerminalServicesInitialProgram= "cmd.exe" > usr.TerminalServicesWorkDirectory= "D:\path" > > usr.SetInfo > > WScript.echo usr.TerminalServicesInitialProgram > Wscript.echo usr.TerminalServicesWorkDirectory > > Can anyone help? > > Thanks! Hi Boris, What you're asking is not a trivial thing. As mentioned above, you need to show what you've tried and what did or did not work. From my experience doing VBScript to Perl code conversions it looks like what you posted are some extracted lines from some existing code that is handling some remove session login. But, those lines don't show how the original VBScripter handled the issues between the lines you included and without those we can't put together very usable responses for you. Translating from one language to another is not a trivial task; To do it well requires good knowledge of the languages, plus of the hardware and/or OS and the tasks being accomplished. VBScript is (to my mind) a lot higher level language than Perl, and VBScript is tightly coupled to the WIndows OS and Microsoft apps. To get you started on the right path toward YOU coding a solution, you'll want to install a copy of ActiveState's PERL, then start reading through the docs for their flavor of Perl. ActiveState includes a lot of Windows/DOS only extensions to tie together Perl and the Windows OS - things you won't find in the standard Perl distribution - so you'll want to know about those as they'll save you a lot of wheel-reinvention. Get "Programming Perl" and maybe a book for Perl on Windows or maybe the Perl for Windows admins book. Then you'll want to get all the docs for VBScript or at least one really good VBScript book, and learn it as VBScript is (kind of) an object-oriented language, where Perl can be procedural or OO (kind of). Then show some more complete examples of what you've tried and what didn't work.
From: RedGrittyBrick on 16 Jan 2007 16:55 Vronans wrote: > Tad McClellan wrote: >> Boris Skoblo <borsk(a)technion.ac.il> wrote: >> >>> please help me convert following VBscript code to Perl code >> [snip VB code ] >>> Can anyone help? >> >> Sure! What part are you stuck on? > > Your assuming he tried already, when it seems clear that he doesnt know > where to start, but I think you knew that but had to be 'witty' any how. Tad is pointing out that if you want help with Perl, it is a good idea to make an attempt and post your code. The Posting Guidelines which are posted to this newsgroup twice a week also make this point. > >> Can anyone write it for you? No, only some people can write it for > ^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^ >> you. > > Why do you ask if 'anyone can', answer 'No', Tad's sentence means "When you wrote 'can anyone help?', did you mean 'can anyone write it for me?' if so, the answer is no." > then say 'some people can'? Self contractiction if I ever saw one, Not really, "anyone" can mean *all* people. Consider the phrase "can anyone convert VB to Perl or are some special skills or knowledge required?" Clearly only someone with some knowledge of both VB and Perl can translate the OP's VB to Perl. There are *some* people who can do this but not *anyone* can do it. I think Tad is being a bit picky, but I suspect anyone spending years answering such questions (as Tad has) is likely to become a bit irritated by what appears to be laziness. >> Show us the Perl code you have so far, we cannot "help" with your >> Perl code if you do not show us your Perl code. > > He didnt post any code, and you knew that, Tad asked him to post what he hadn't posted so far. Only the OP knows whether he has already made an attempt at writing a Perl equivalent of the VB. > so why are you kicking this guy around in the dirt? Tad's request is a reasonable one. I don't feel it equates to being kicked in the dirt. After all this is primarily a newsgroup for helping Perl programmers (including learners), not a newsgroup for getting complete programs written by other people.
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: WWW:Mechanize single quotes around URL causes problem Next: parse body mime message |