Passing Arguments Into An Exe File For Processing?
Aug 21, 2009
I want to pass text into an exe file which is named say.exe. It can convert to phonemes using the command line -lp. after the say.exe..
I need to allow user input text and then convert the text and save it in a text file which would be created as it converts...
find below the code for initiating a process below...
' passing the text saved in the file into the application
Dim ProcessInfo As New ProcessStartInfo("C:Program FilesDECtalkUSsay.exe", UserInput)
[Code]....
View 5 Replies
ADVERTISEMENT
Jan 6, 2010
2008 Array Processing and Sequential File Processing
View 14 Replies
May 19, 2011
Im a college student and this is my first programming class, i am having extremely diffcult time with arrays and sequential file processing. Im not asking for the whole program, just something to get me started and hints along as i progress with it. Please help me get started on my program, its due in 2 days.
Here are the requirements....
1. The program must input any number of individual�s last and first names using two separate textboxes.
2. The array of names must be sorted by the last name using a bubble sort. You must code the sort.
3. The program must be able to recall the names from the file and add to the existing list of names so that more names can be added to, sorted, and written back to the file in sorted order.
4. Sort in ascending order: A to Z
5. All names must be displayed in a listbox in sorted order when the user wishes to see them.
6. In the listbox the last and first names must be separated by a comma and a space. Example: Smith, Mary
7. The user must be able to search for a name in the array, using the binary search algorithm. You must code the search.
8. Do not use module-level variables. Instead you may choose to use Static.
9. The program must be designed using Visual Basic 2008
View 3 Replies
Aug 3, 2011
I am having a problem figuring this out. The text that is bold is where the problem is.
Imports Microsoft.Win32
Console.WriteLine(WMILookup("Win32_Bios","SerialNu mber"))
Private Function WMILookup(ByVal WMIClass as String,ByVal WMIItem as String) As String
[Code].....
View 2 Replies
Dec 25, 2010
I'm currently using the code:
Public
ReplaceThread As
System.Threading.Thread<br/>
[code].....
View 2 Replies
Feb 11, 2010
topfunction(myarray, yourarray)
dim function topfunction(byval array1() as integer, byval array2() as integer)
dim function subfunction1(byval array1() as integer)
[code]....
View 2 Replies
Jan 8, 2010
I have an application that I start from a sub main. Pass it some arguments and then open a form. Very similar to the log in form. Inside of this application I use 2 dll's. One I had written and another from a vendor. When I run my app from the IDE everything closes down ok. When I run my application from another application(similar to the command line start) the image of the log in box stays on the screen, until I move another window that does a screen redraw.
The process is stopped, by looking at the running process's on the computer. My next question, the dll that I wrote for it is a vb.net class(dll)... I do not have a destructor in it.. I just left the Protected Overrides Sub Finalize() alone which contains MyBase.Finalize() With my dll, could that be causing the window to keep itself drawn? Due to the two dll's connecting to device only within our network. Not sure if remote desktop or citrix causes a screen redraw.
View 7 Replies
Sep 11, 2010
I could pass a User Defined Type data structure to a Fortran DLL, that contained Short Integers, Singles (real variables) and a series of Fixed Arrays, both short integers and real variables.I am upgrading my VB6 app to Visual Studio 2008 - VB, and I want to keep the same data structures as they are used in about 300,000 lines of code.I modified the Data Structure as follows below, making sure it is of Explicit Layout, since I want the position of all variables to be the same both in VS 2008 and Fortran.Two problems arise:
1) if the LayoutKind is Explicit, such as in the example below (only part of the data structue is shown, where "..." indicate part of omitted data structure members), whenever I try to run my app, I get the following exception message, which indicates that the VBFixedArray declared at Offset 154 is in conflict with some other object, unnamed by the exception handler.
Message="Could not load type 'MyApp.SomeStruct' from assembly 'MyApp, Version=1.32.3906.33480, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 154 that is incorrectly aligned or overlapped by a non-object field."
Source="MyApp"
TypeName="MyApp.SomeStruct"
StackTrace:[code]....
2) if the LayoutKind is Sequential, the app will start, all the data preceding the VBFixedArrays is passed to the Fortran Dll without problem; everything that follows the VBFixedArray is garbled and unusable. To check this, I have made a Fortran subroutine in the Dll to which I pass both the Data Structure and a vector; in the Fortran subroutine, all the elements of the data structure are equivalenced to individual positions in the vector; upon return from the Fortran subroutine, I compare the elements of the data structure and those of the vector.
The problem here is that the Data Structure contains some 1300 names, and is used extensively in the application, as it is the way to pass elegantly a lot of data pertaining to a mathematical model with only one adress when accessing the Fortran Dll, in which the computing engine lies.
<StructLayout
<StructLayout(LayoutKind.Explicit, Size := 9226, CharSet := CharSet.Ansi)>
Public Structure SomeStruct[code]......
View 5 Replies
Feb 8, 2010
Also, I'm sure I explained myself well enough, but just in case I didn't, I've attached a jpg with form/control examples w/code
View 3 Replies
Mar 27, 2009
I can connect when I go into command prompt manually and type: rasdial one username password
This will work. It will dial and connect.
Now when I try doing this programmatically it will not work. It doesn't seem to be passing the arguments I've specified:
[Code].....
View 4 Replies
Oct 25, 2009
I am trying to pass arguments to my wintv.exe program using the process.start command but I am getting errors...Here is one example that starts Wintv but the program does not begin to record and Wintv throws up a bunch of errors and quits.
Code:
Process.Start("c:progra~1wintvWinTV.EXE", " -c1 -ntod -startr:WinTV_(0).mpg -qdef -limit:3600 -mute")
[code]....
View 2 Replies
Apr 18, 2009
I'm running some command line programs through my app and I have to pass some parameters to the command line app.I'm launching the command line with Start.Process and using StartInfo.Arguments = "".The problem is that some of the parameters require me to pass quotes and when I put quotes into the compiler, it doesn't register it in the way I want it to.
View 3 Replies
Nov 30, 2010
I'm trying to use a string variable in StartInfo.Arguments of a process, but can't figure out the correct syntax.
[code]...
View 1 Replies
Mar 4, 2011
I have an ASP.NET MVC controller action with the following VB.NET signature:
[Code]...
If I'm trying to send an Ajax POST in jQuery to the ClosestCities action, what should my request look like? When I use the following code to POST to this action, in the debugger window of VS, position.longitiude and position.latitude are equal to 0.0 (0D):
[Code]...
View 2 Replies
Jan 19, 2010
I have a single instance database app that emails out notifications. I would like to add a link in the emails that when clicked would open up the app and go to the section of the program that its supposed to go to. I implemented my own URL protocol so that links starting with my codewords get passed to my EXE. So far so good. I then parse the URL and pull the keyword and identifier out to open that section of the program. So if a user clicks a link like this:
MyApp:LoadCompany?ID=323
My application will start, it will grab the arguments (LoadCompany?ID=323), pass this to my load company routine and then load up company ID 323. Works great.
Now the issue is if the program is already open I still want the links to work but since it's a single instance app it just closes the second app. How can I add something ot the app to watch for this or receive a message from the second app? I know I will need to check status of what I'm doing and make sure things are saved, check security, etc but I can get all that done easily enough. I've found some examples online but none really did what I wanted them to.
View 8 Replies
Jan 22, 2011
I used to program with Visual Basic 6, so I have alot of old programs that I'm updating, plus I'm learning the new VB2008 methods. I'm writing a program that replaces the old "BitBlit" function which is no longer supported by Visual Basic 2008. It involves three picture boxes, one holds the sprite bitmap, a second holds the mask (silhouette) of the sprite bitmap, and a third has a background image.
[Code]...
View 3 Replies
Mar 18, 2011
I just learned some basics of multi threading in VB.net recently as I came across processing a large List of records and inserting them into SQL database one by one.
I have code look like this:
Private Sub btnLoadNow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadNow.Click
Dim autoLoad1 As New Thread(AddressOf AutoLoad)
autoLoad1.Start()
[CODE]...
Itemlists is a global lists i retrieved from database, everything looks fine to me but when i run this program, I found that the threads are inserting one records 9 times into the database(I have 9 threads in total), which makes me think that maybe i need to specifically assign 1/9 of a list to each thread? Is there another way to do it which doesn't require the splitting of the list, if not , how do i split it then assign?
View 1 Replies
May 13, 2010
what im trying to do and what i have done so far is probably a little backwards not sure sure how to id it any other way.when the user generates an error because a particular file doenst exist ive got my dialoge box to generate an .txt file for each file it errors on, so that the administrator can check and update missing files as an when - shouldnt be many files missing in the first place, should just be new product ranges or item just launched.what im stuck on is:
1. is there a better way
2. how do i open a .txt file and add the extra lines to it, so i re use the file but keeping the previous data.
View 2 Replies
Oct 28, 2010
I have a program that opens a fixed length delimited file and process each line depending on what it starts with.
Sample Input:
101 000000000 0000000001010271255A094101National Payment Corp National Payment Corp
5200Happy Company ACH20101021-001.txt PPDDIR DEP 101105101105
[code].....
View 3 Replies
Apr 2, 2012
Is there an easy way to read in a comma deliminated file in VB 2010. In VB 6.0 you could read the file in directly to variables. It appears this has been removed in 2010.
View 1 Replies
Feb 27, 2009
I was working on an app that calls a batch file to do some simple tasks and found out this machine has some issues when trying to run them. really weird! so i did some testing and here are my resultsthis is a little strange to me and i can't think of why this is happening... let's say i have a simple bat file called test.bat these are the contents
@echo off
echo testing...
pause
When i go to run this bat, this is the output: C:>â– @ 'â– @' is not recognized as an internal or external command, operable program or batch file. It seems every bat i make on this machine is being preempted by the block character which renders bat files useless...
View 2 Replies
Sep 25, 2009
I'm trying to keep the oldest file and move the new ones to a different directory
View 7 Replies
Feb 27, 2009
I have a text file that contained about 50,000 lines of data which are all the same format as below
0000710950,INFEED NAME,40,INFEED TIME,0,ENTRY,55649,MCS,[code]....
What I would like to do is read this data in as fast as possible either line by line and processing the data as I go by line. Or read the whole lot in and THEN process it, which woulkd be the fastest ? I used to do this in Excel but want to transfer it to VB and don't know really how to get started I have the following but would like to know how to get the columns into a named array and then how to itterate through array.
Dim myLines() As String = IO.File.ReadAllLines("C:SYNC_DATA�0 - LGW�5 - Archived�0 - IST Logs2008istlog20090224.txt")
View 4 Replies
Aug 21, 2011
visual basic 2008 HOW is the word(doc) processing file ,the row column?
View 2 Replies
Nov 19, 2009
I am a Real Estate appraiser and have some limited experience with vb and .net. I have a task which I perform which requires me to go to the conuty appraisers web site and print a copy (to image bmp or jpg or directly to the default printer) of the current public record info for anywhere from a few pages to 1,000 plus records at a time.
I don't really get paid to do this part of the job so they don't care whether it takes me a few minutes or several hours to do this. I thought there must be a way to automate this process, so last week I started searching and test code snippets.What I have to date opens an instance of IE; navigates to the reguested page; finds the form elemet for AcctNo; fills it in and submits the form. The page that comes back is formatted for screen presentation and is not suitable to be sent to the printer. There is however a link which when clicked returns a page formatted for pinting. Downside is it also brings up the print dialog which then has to be handled. I was able through several methods to click either the print button or the cancel button which leaves me with a document that is either sent to printer or sitting on screen.
The questions are: Is there a way to do this without displaying the Print Dialog? Maybe a HTTPRequest or HTTPWebREquest as I have no need to see the screens just need the final page.The resultant page is typically longer then letter by a few lines and wants to print on two pages. It would be nice to resize the page to fit and typically it will be the same resizing. If I stick with the print dialog either clicking print or cancel how can I intercept the document and decide by options set in the program wheter to send the file to the printer or save to image?
View 4 Replies
Jan 11, 2011
I'm trying to use a java servlet in a 3rd party tool's web interface (CA service desk) to invoke it's download file functionality using a webclient in vb.net. The trouble is the text stream from response is markup and not the acutual text file stream.
It's like the page is redirecting to another page which actually presents the file for downloading. I have no idea what the redirected page URL is.
Is there a way I can process this redirected page in order to get at the download using a system.net.webclient?
View 1 Replies
Feb 10, 2007
nutty VS2005 error. I know I have an error in my dataset file (XSD file), but none of the errors listed after this warning message truly points to the source of the problem. In the past, when my dataset had only a few tables, it was easy to find the error. Now I have 50+ tables. I'm not sure where to start.
[Code]...
View 2 Replies
Jul 7, 2010
Using this code I can create a shortcut to my application,
Dim shell As New WshShell
Dim shortcut As WshShortcut = shell.CreateShortcut(My.Computer.FileSystem.SpecialDirectories.Desktop & "Link To My Application.lnk")
shortcut.TargetPath = Application.ExecutablePath
[code]....
But how can I create a shortcut with arguments.If i put the arguments in the shortcut.TargetPath i get a error.
View 9 Replies
Nov 30, 2010
This is my first time programming with visual basic, but the GUI I'm trying to create isn't complicated. So ,after looking at the tutorial for a bit, I got started.What I'm trying to do is run a c++ program which I created, but I'm making the GUI so that other people can use it easily.The c++ program needs arguments, so I have to text boxes on my GUI that will contain those arguments. One is a file path and another is an integer.I'm trying to run the .exe file for my c++ program with a shell script, but I can't get the syntax right.I don't want anything ecial I just want to run the program and pass it arguments. Here is what I have:I'm trying to use a shell command, as you can see.I can run the program from the visual studio 2008 command prompt by typing "cl DataRedux2.cpp" to compile and "DataRedux2.exe" to run.
View 7 Replies
Feb 16, 2009
I am working on a VB.net program that must get data from excel workbooks. I open the excel workbook, copy a chart image tp the clipboard, then copy the contents of the clipboard to a PictureBox.Image. The problem I am having is the files contain links to other workbooks so when I open them I get a message box asking if I want to update the links. Since this is ment to run automaticaly at certain times I will not be there to click on Yes or No.I also have a similar problem when I try to close the workbook. I get the messagebox for saving changes to the file.Here is the code I am using:
Dim objXLS As Object = CreateObject("Excel.Application")
Dim FileName, Sheet As String
Dim data As IDataObject
[code]....
objXLS.ActiveWorkbook.Close()'This is where I get the file save changes message boxI am using Visual Studio 2008 Pro and excel 2003My operating system is XP?
View 2 Replies