How do I get VI name and path where mouse is programati​cally from another VI
Hi, this is my first question here.
I am trying to create a permanent running, ObtainInfo.vi, in LV 7.1 that automatically gets ínfo from other running VI:s. I would like to obtain info from the other VI:s when the mouse is being clicked over there. Information could be the other VI:s name and/or reference. I have tried different methods without any results.
Solved!
Go to Solution.
I gave it a try myself. The screenshot is attached. The problems unsolved are some errors I get when I used all VIs, the execution state property is the workaround for this. You certainly also want to have it for VIs that are Running (not top-level).
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml
Attachments:
MouseDown.PNG 43 KB
Similar Messages
-
How do I get about:config and other about: addresses to drop down from URL bar?
How do I get about:config and other about: addresses to drop down from URL bar?
It's a pain having to retype them in full... not sure why there is no easier interface to them.hello, you can bookmark the sites for faster access.
[[How to use bookmarks to save and organize your favorite websites]] -
How do I get my photos and music back into new version iTunes from my iPad?
I have the new version of iTunes (11 0 2 26) for Windows which installed over my old copy. I see none of my music etc even after it claims to have synced and backed up. How do I get my photos and music back into iTunes from my iPad? It syncs OK with calendar and contacts from Outlook and I can force copying of apps and books but why does it not show music and photos in the iTunes library? help please.
DavidEmpty/corrupt library after upgrade/crash
Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
Alternatively, depending on exactly when and why the library went missing, there may be a more recent .tmp file in the main iTunes folder that can be renamed as iTunes Library.itl to restore the library to a recent state.
See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
When you get it all working make a backup!
Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
tt2 -
Get file name and path from adf inputFile
Hi,
I use adf's inputFile component. I need to get the file name and filePath. Does anyone knows how to do that?
Thanks in advanceYou may bind the value to an UploadedFile object and get the name from this object.
You may use a valueChangeListener backin bean method or a managed bean.
Here the code i just write for something similar. Note that i'm not able to test it because of a bug in 10.1.3.1 with inputFile and web.xml parameters. I still waiting for the patch.
public void uploadedFile(ValueChangeEvent valueChangeEvent) throws IOException,
Exception {
final int BUFFER = 2048;
byte data[] = new byte[BUFFER];
int currentByte;
String fileName;
UploadedFile uploadedFile =
(UploadedFile)valueChangeEvent.getNewValue();
if (uploadedFile != null) {
String mimeType = uploadedFile.getContentType();
if (mimeType == "application/x-zip-compressed") {
// get the uploaded file as a zip file
ZipFile zipFile = new ZipFile(uploadedFile.getFilename());
// verify the zip archive contains only one entry
if (zipFile.size() != 1) {
FacesContext context =
FacesContext.getCurrentInstance();
ResourceBundle errorMessage =
ResourceBundle.getBundle(context.getApplication().getMessageBundle());
Exception ZipFileContentException =
new Exception(errorMessage.getString("error.fileUpload.zipFileContent.moreThanOneEntry").replace("{0}",
String.valueOf(zipFile.size())));
throw ZipFileContentException;
// get the entries in the zip file even it is only one
Enumeration zipFileEntries = zipFile.entries();
// Process each entry
while (zipFileEntries.hasMoreElements()) {
// grab a zip file entry
ZipEntry entry =
(ZipEntry)zipFileEntries.nextElement();
// check the entry is not a directory
if (entry.isDirectory()) {
Exception ZipFileContentException =
new Exception(JSFUtils.getStringFromBundle("error.fileUpload.zipFileContent.isDirectoryInsteadFile"));
throw ZipFileContentException;
File destFile = new File(entry.getName());
Magic magic = new Magic();
// getMagicMatch accepts Files or byte[],
// which is nice if you want to test streams
MagicMatch match = magic.getMagicMatch(destFile, true);
if (match.getMimeType() != "application/xml") {
Exception ZipFileContentException =
new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
match.getMimeType()));
throw ZipFileContentException;
//TODO get the repository directory from classification-param.xml
BufferedInputStream is =
new BufferedInputStream(zipFile.getInputStream(entry));
FileOutputStream fos = new FileOutputStream(destFile);
BufferedOutputStream dest =
new BufferedOutputStream(fos, BUFFER);
// read and write until last byte is encountered
while ((currentByte = is.read(data, 0, BUFFER)) !=
-1) {
dest.write(data, 0, currentByte);
dest.flush();
dest.close();
is.close();
zipFile.close();
} else if (mimeType == "application/xml") {
String currentEntry = uploadedFile.getFilename();
File destFile = new File(currentEntry);
BufferedInputStream is =
new BufferedInputStream(uploadedFile.getInputStream());
FileOutputStream fos = new FileOutputStream(destFile);
BufferedOutputStream dest =
new BufferedOutputStream(fos, BUFFER);
// read and write until last byte is encountered
while ((currentByte = is.read(data, 0, BUFFER)) != -1) {
dest.write(data, 0, currentByte);
dest.flush();
dest.close();
is.close();
} else {
Exception ZipFileContentException =
new Exception(JSFUtils.getStringFromBundle("error.fileUpload.isNotXMLFile").replace("{0}",
mimeType));
throw ZipFileContentException;
} -
Get the name and path of the calling JSP
Hi all,
I have a code structure like this
class MyBaseServlet extends HttpServlet{
doPost(){processRequest();}
doGet(){processRequest();}
processRequest(req, resp){}
myPrivateMethod(req,resp){
//I want the name of the JSP which invoked the servlet that extends this(MyBaseServlet) here
class MySerlvet extends MyBaseServlet{
processRequest(req, resp){}
I have a JSP which submits in the <FORM> action calls MyServlet. Since MyServlet extends MyBaseServlet, and this has the doPost() and doGet() methods, the control goes here first, and then since MyServlet has overridden the processRequest() method , the control comes here.
My query isthat, while in MyBaseServlet (either in doPost() or doGet(), say I call myPrivateMethod(), is there any way here, inside myPrivateMethod() to get the name of the JSP which called MyServlet.
Note:
The constraint here is that we are not in a position to include any code into either the JSP or MyServlet. I'm running this in a J2EE environment on Websphere.
Thanks in advance.You can use the methods of the HTTPServletRequest class to get the URI/URL info...for example request.getRequestURI() /URL()/ServletPathInfo()
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html -
How can I get a calculation on one field to complete after calculation from another is done?
I have a form that is used to calculate mileage for multiple trips.
Miles to be reimbursed field (reimb1) is calculated from miles drive minus personal commute (for example, I drove 20 miles, but 5 of it was from my home and not reimburseable). AFTER that calclation comes up that number (theoretically 15 miles) is used in a total miles field regardless of whether or not I'm calculating one or multiple trips. From there, a hidden field calculates the total miles multiplied by the currect mileage reimbursement rate of .565.
The way I have the various fields set up does in fact return the correct miles (15), but calculates on the 20.
How do I get the total miles to "react" on the final number that shows in the reimburse field.
Also, on odd numbers, it's not rounding up. I've seen several of your posts here and others in a general internet search on how to "round up" but I can't get them to work (probably because I can't get the other fields to work!). In the above hypothetical, I need the final answer of $8.48 to show for the reimbursement amount, not $8.475.
The form also doesn't seem to reset itself. For example, if I resuse it or if I go back and make a correction, it still uses the very first entry I put in some of the fields. I've never had this happen.
Thanks,
PageWhen you reset a form it goes back to the default values, which are not necessarily blank... You can edit that value under the Properties of each field.
-
How to list long file names and paths longer than 260 characters in vbscript?
Hi there,
I have looked in different posts and forums, but couldn't find an answer to my question.
So, here it is... imagine the small piece of code attached below. I need to be able to iterate and rename recursively (I didn't include the recursive part of the code in order to keep things simple) through files and folders in an user selected path. I thought that by using vbscript FileSystemObject I would be able to do so.
Unfortunately, it seems like the Files method does not detect files whose path is larger than the OS 260 (or 256?) character limit. How could I do it so? Please, don't tell me to use something different than vbscripts :-)
Thanks in advance!
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = FSO.GetFolder(Path)
Set colFiles = objFolder.Files
For Each objFile In colFiles
Wscript.Echo "File in root folder:" & objfile.Name
NextYes, that describes the problem, but not the solution - short of changing the names of the folders. There is another solution. That is, to map a logical drive to the folder so that the path to subfolders and files is shortened. Here is a procedure that offers a scripted approach that I use to map folders with long names to a drive letter and then opens a console window at that location ...
Dim sDrive, sSharePath, sShareName, aTemp, cLtr, errnum
Const sCmd = "%comspec% /k color f0 & title "
Const bForce = True
if wsh.arguments.count > 0 then
sSharePath = wsh.arguments(0)
aTemp = Split(sSharePath, "\")
sShareName = aTemp(UBound(aTemp))
cLtr = "K"
with CreateObject("Scripting.FileSystemObject")
Do While .DriveExists(cLtr) and UCase(cLtr) <= "Z"
cLtr = Chr(ASC(cLtr) + 1)
Loop
end with
sDrive = cLtr & ":"
Else
sDrive = "K:"
sSharePath = "C:\Documents and Settings\tlavedas\My Documents\Script\Testing"
sShareName = "Testing"
end if
with CreateObject("Wscript.Network")
errnum = MakeShare(sSharePath, sShareName)
if errnum = 0 or errnum = 22 then
.MapNetworkDrive sDrive, "\\" & .ComputerName & "\" & sShareName
CreateObject("Wscript.Shell").Run sCmd & sDrive & sShareName & "& " & sDrive, 1, True
.RemoveNetworkDrive sDrive, bForce
if not errnum = 22 then RemoveShare(sShareName)
else
wsh.echo "Failed"
end if
end with
function MakeShare(sSharePath, sShareName)
Const FILE_SHARE = 0
Const MAX_CONNECT = 1
with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
with .Get("Win32_Share")
MakeShare = .Create(sSharePath, sShareName, FILE_SHARE, MAX_CONNECT, sShareName)
end with
end with
end function
sub RemoveShare(sShareName)
Dim cShares, oShare
with GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set cShares = .ExecQuery _
("Select * from Win32_Share Where Name = '" & sShareName & "'")
For Each oShare in cShares
oShare.Delete
Next
end with
end sub
The SHARE that must be created for this to work is marked as having only one connect (the calling procedure). The mapping and share is automatically removed when the console window is closed. In the case cited in this posting, this approach could be applied using the subroutines provided so that the user's script creates the share/mapping, performs its file operations and then removes the mapping/share. Ultimately, it might be more useful to change the folder structure, as suggested in the KB article, since working with the created folders and files will still be problematic - unless the drive mapping is in place.Tom Lavedas -
How can I find the name and path of the host html page
Hi all,
I want to make a banner using flash. This banner will be
included in several pages in several domains.
So, I want to count the clicks and store statistical data,
calling an asp, and I want to get the host HTML page name which
includes my banner.
How can I do this?
Thanks in advanceor you can use the localConnection class inside of flash....
it will return the domain name for you.
var lc:LocalConnection = new LocalConnection();
trace(lc.domain()); -
How to change the default password file's name and path when the database created?
how to change the default password file's name and path when the database created?
nullUsage: orapwd file=<fname> password=<password> entries=<users>
where
file - name of password file (mand),
password - password for SYS and INTERNAL (mand),
entries - maximum number of distinct DBA and OPERs (opt),
There are no spaces around the equal-to (=) character. -
How to print the report file name and path and the last mod date
Good morning,
I am trying to print on the footer of the report the report file name and path as well as the report last modification date.
Anyone would know how I can do that? I have checked the doc but found nothing.
Thks. Philippe.Did you ever determine how to print report name and report last mod date?
Thanks -
after I burn the files to dvd and load to view the name does not appear. How do I get the name listed to appear on the burn disk instead of the file number?
Naming the Photo - or giving it a title - is not the same as naming file.
How are you burning to dvd? With iPhoto? If so then the Title will be available in any app that understands basic metadata.
If you want the title available in the Finder - which does not understand photo metadata - then you'll need to export the file
File -> Export
In the resulting dialogue you'll see a heading for 'File Name'. Choose 'Use Title' from the drop down.
Regards
TD -
I ordered Illustrator via creative cloud for another user. I received an invitation that was accepted and tried to change the account to the name and email of the person it was ordered for. How can I get this changed and the invitation sent to the right person?
Cloud as a Gift https://forums.adobe.com/thread/1665610
-
How to find PG.xml file name and path associated with a FUNCTION
Hi,
I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
How to find PG.xml file name and path assoicated with above funtion.
Thanks,
ashokAshok,
Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
--Shiv -
I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?
I have a script called ExportImport for this task, but it only runs in Windows.
In principle something similar should be possible in AppleScript, but I don't currently have access to a Mac to write it myself.
tt2 -
im using new ipad 32gb and i cant get user name and password how i configure it ? please give me solution
What do you mean 'can't get user name and password' ? What are you trying to do with your iPad and what happens when you do it ?
Maybe you are looking for
-
How do I load one computer to another
One of our computers logicboard has gone and I am wondering if I can load his computer onto my computer so we can share until we can buy another at the end of the year. he can't even start his. Is it possible to load his information onto my computer
-
Trying to upgrade to 10.4 but keep hitting a snag
I'm in the process of trying to upgrade to 10.4, and the Read First file on the install disk says that you should do a Software Update to make sure everything's up to date, but when I go to Software Update from the Apple menu, nothing happens. I trie
-
Nokia 808 camera lens not working - help
Hi, my Nokia 808 camera shutter is not opening or closing. It is stuck in a half opened state. M is there anything I can do, before sending in for repairs, to try and reset the shutter? I can't take any photos as they end up over exposed! Thanks
-
Edited gif file will work in a viewer, but not in email client
An animated gif file received in my email client, after editing will not work in the same email client, but is working properly in a browser. Further, the background in the altered gif is black in the email client instead of the non-pixelated file th
-
Could not complete the last command : problem with toast 10
Hi, I am trying to burn blu ray content with Toast 10 Pro (blu-ray content burned to DVD). I have created the content (Quick Time movie) with FCP 7 (into an MOV file). And then added it to Toast 10. Then I tried to create disk image. It gave me this