|
I mean the SaveSettings and GetSettings im not really understand it. They are not vb.net default code right? I got it underlined and "name saveSettings is not declared".
|
|
|
|
|
I know how to do this in C or in perl but cannot figure out how to do this in VBscript... Is Vbscript just not robust enough?
I do not know.
I want to execute a simple dir command and read the output. thats it.
I MUST use the console (cmd.exe dir.) in the other languages I know reading from a shell command is simplicity itself vbscript seems to not have this capability.
|
|
|
|
|
On the contrary, it does have this ability and you don't need the console to do it. You need to use the FileSystemObject[^] to return a Folder object, which wil have a Files property that gives you all the files in that Folder.
Dim fso, fldr, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder(folderspec)
For Each f in fldr.Files
WScript.Echo "File: " & f.name
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Props for teaching me something new, and something that will be useful to me.
What I need however is to go to the console.. i have a very good reason for this but I do not want to go into it just now...
thanks for telling me how to do a directory...
|
|
|
|
|
You made it sound like that's the only way to could get a directory.
But, if that's how you have to do it, great. But, then I don't understand what the problem is. Are you saying you have to read the directory, then output it to the console window? Simple, run your script using CSCRIPT, not WSCRIPT.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK here is the deal.
in my place of business we have certain enviornmental settings, some of which can only be called from typing "set" at the command line. i was using "dir" as an example. So I want to do this within a web page...
I click on a button then i get enviornmental settings for that machine on another page or maybe on the page itself... it would not be hard to format the out put to a text file with the proper /etc. then assuming i could open this new page up... I would be golden... i just have thousands of users and computers to support and want to do this a certain way. i could be wrong but i think that this is the only way that will work for us.. (we have to have some rather archaic junk on our systems to communicate with lab equipment etc...)
Sorry if I was misleading.. I just wanted to do this from console... you know?
|
|
|
|
|
Lordahdaring wrote:
n my place of business we have certain enviornmental settings, some of which can only be called from typing "set" at the command line. i was using "dir" as an example. So I want to do this within a web page...
I click on a button then i get enviornmental settings for that machine
Do what? I don't understand this description. Are you talkinga bout getting/setting the environment strings for a client computer from that very same client computer on a web page?
You can get the environment settings, but setting them from a web page is not possible. Code running inside a web brower runs under tight security restrictions and the registry when these environment settings are stored is completely off limits to that code, unless the browsers security restrictions are modified.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
no.
go to a command prompt, type set.
the output of that I want into a web page.
That is it.
|
|
|
|
|
If you do this in C# and ASP.NET, you'll get the Environment variables for the server. If you want the client variables, you'll have to write the code into the page in VBScript. ASP.NET is a server-side only technology that generates HTML for the client, nothing more.
Test your code. If the browsers don't consider your server in the Intranet zone, the VBScript code will fail with an "Access Denied".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear all,
I use Connector/Net 1.0.4 and Visual Studio 2003 (Windows XP).
That earn to work goodness at my windows form application beforehand I Add Reference which referrer assembly Mysql.Data.Dll.
To more practical, I try to place component into toolbox, like ODBC (in NET 1.0). Really succeed to present component at toolbox, but when I try to use the component, there are error message like :
The .NET Assembly 'MySql.Data' could not be found
Is the Connector/NET does not designed for toolbox component?
regards,
didik
|
|
|
|
|
connector.net is wonderful BUT does not provide any toolbar stuff.
main usage is like
Dim MYSQL as new MySQL.STUFF.MySQLconnection()
when u need to exchange data:
Dim C as MySQLCommand = MYSQL.CreateCommand
C.Commandtext = "SELECT * FROM test.testtable"
Dim R As MySQLDATAReader = C.ExecuteReader()
'R.read() 'goes one record down
'r.getvalue(idx) 'return the column index data as string
use c.executenoresult (or something like this)
for INSERT like queries
<- true inside to understand outside ->
|
|
|
|
|
Is it possible to catch key combination (like Ctrl + Shift + M) when they are pressed in a form, using VB6?
<italic>Work hard, Work effectively.
|
|
|
|
|
Yes and it is so simple:
Just use the Key_Down or Key_Up events:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
End Sub
KeyCode is the keycode of virtual key of the key pressed (for ascii characters, it is the same as the ascii code of the key)
Shift is tells you if Shift/Control/Alt are pressed:
if it's 1 means shift is down.
if it's 2 means control is down.
if it's 4 means alt is down.
if you need a combination of the keys, just some their values:
e.g. for Shift+Control+M
KeyCode=vbKeyM
Shift=3 (= 1 + 2)
|
|
|
|
|
When i want to handle an event from a remoting class in the client app i got
a security exception telling me that DelegateSerializationHolder is not
permitted to be deserialized at this security level. Use .NET security
policy administration tool.plz guide me how can i handle this error and what security permissions
should i give to my assembly.
|
|
|
|
|
Is there any way to just disable any input from user but
not disable the control itsself. basically i want to display
character in richedit box for read only
Shin
|
|
|
|
|
Try setting the ReadOnly property of your RichTextBox control to True and see if that is the desired result that you want.
Best wishes for you and you project.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
|
|
|
|
|
Check out this article:
http://www.codeproject.com/cs/miscctrl/ListViewEmbeddedControls.asp
Included in his demo project, is a subclassed read only rich text box. Might be just what you are looking for.
--
Dave
|
|
|
|
|
Hi,
I'm trying to create a multi-dimensional (2) array of CheckBox in VB.NET. Can't figure out the syntax... can anyone help?
Thanks!
here's my code:
Private _columns(,) As CheckBox<br />
...<br />
_columns(DaysCount, PeriodCount) = New CheckBox()
|
|
|
|
|
In C# it's type[,] array = new type[55,5]; I assume you can remove the ; and turn the [] into ().
Maybe Private _columns(,) as CheckBox (40, 20) ???
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The thing is that I don't know up front the size of the array.
Someone on the newsgroups said I needed to use Redim. So VB6
|
|
|
|
|
Redim is supported in VB.Net, including Redim Preserve.
|
|
|
|
|
Supported yes, but good practice? I doubt it.
Goto is still supported you know!
(I miss GoSub though! ahahah)
|
|
|
|
|
Carl Mercier wrote:
Supported yes, but good practice? I doubt it.
You'll go far. Too many former VB6 users still use all the crap stuff in .NET.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Right on. Sometimes I just hate the fact that they support all this old syntax for "compatibility". Let's face it, VB6 projects just can't be "converted" to .NET automatically.
This makes VB.NET look like a toy language to many developers, while encouraging bad coding practices.
I use C# just as much as VB.NET. I tend to prefer the VB.NET syntax, however, because I'm so used to it. I started coding basic on a TRS-80 so Basic feels like home to me. I'm not one of those VB6 guy trying to go "Hey Ma, Look! VB.NET!".
I guess I have no choice but to use Redim for now. Oh well!
|
|
|
|
|
Carl Mercier wrote:
I started coding basic on a TRS-80 so Basic feels like home to me.
Cool - I started with the Apple ][, and I also coded basic on the C64 and Amiga. However, I stopped coding for years, and learned on a PC with C++, which is why the C++/C# syntax feels more natural to me nowadays.
Christian Graus - Microsoft MVP - C++
|
|
|
|