Jump to content

roboz

Members
  • Posts

    17
  • Joined

  • Last visited

roboz's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, My server script in the ZIP file in this thread does exactly what you're looking for. Alex
  2. Hi there, I wrote this script about 6 months ago because my colleagues at work were tired of walking over to our iTunes PC to see what song is currently playing. I also saw the need for a feature that allows you to do a quick search on Google/Amazon for the current album or artist. I know there are many solutions out there that do pretty much the same. But most of them work either only on one computer or are made to update info on a website. Here's how it works: 1. Copy "NowOn server.exe" and "trackinfo.txt" somewhere on the computer that's running iTunes. 2. Right click on the folder that contains "NowOn server.exe" and share it to make sure every computer on the network can access it. 3. Open "NowOn.ini" with a texteditor and enter the network path of "trackinfo.txt" on the iTunes PC. The line should look something like "\\ITUNESPC\nowon\"trackinfo.txt 4. Start iTunes and "NowOn server.exe" which will update the trackinfo.txt with the trackinfo of the current song. 5. Now if you want to know what song is playing just start "NowOn.exe" on any PC that's part of the network and has access to the shared folder. Don't forget to copy the ini file with "NowOn.exe". Please note that I'm still a newbie when it comes to programming. My code is messy and there's a lot of room for improvement and still a few bugs. So you're using it at your on risk. It's been running quite reliable on our company network for the last few month. If you're interested here's what I'm planning for future versions: - be able to show previously played songs - Switch text file to direct COM communication or TCP Bug reports, ideas and comment are always welcome. Here's a ZIP file wich contains compiled versions and the source code. You need the latest beta of AutoIt to run the source code. NowOn_v0.6.zip
  3. Thanks for pointing me in the right direction.
  4. Hi, I've developed a script a few months ago that shows you which track is currently playing on the iTunes computer at my office. A host script is running on the iTunes computer which writes the track info into a text file everytime the track changes (I'm using the COM interface for that). Now the client script on the other computers checks if the timestamp of the text file on the iTunes pc has changed. If that's the case it reads the info from the file and displays it. Previsously I used a third party iTunes plugin that writes the track info into the registry and then my script puts this info into the text file. It was working fine like that for the last few month but now that I've discovered the COM interface I've changed that part as mentioned above. The only problem is that whenever I change the track in iTunes now it freezes for a few seconds. This only happens when a client is running. I guess it has something to do with the fact that host and server script are trying to access the text file at the same time. I know it's probably not the most elegant solution anyway, so I thought that it might be possible to the same thing with the TCP functions in AutoIt. I just had a look at the TCP server/client sample scripts to get an understanding how things work. I'm still a beginner when it comes to programming so my question is if something like the scenario above would be possible with iTunes. In theory I thought it could work like that: The host IP is saved in the client's ini file. Every x seconds client connects to host to receive the latest trackinfo. Is that possible? What if there are, let's say, 5 clients trying to connect to the host at the same time? As I said, I haven't done any TCP stuff in AutoIt and just wanted to check first if something like that is possible in theory. I hope all of the above makes sense Thanks!
  5. Thanks for all the help. I think I'll go with the $SS_NOPREFIX because I'm reading the information directly from iTunes through the COM interface, so that's probably the easiest way.
  6. I'll do that. Thanks
  7. Thanks for the quick replies. So is there an easy way to show the string in the label literally?
  8. Hi, I've got a problem with displaying the "&" sign properly. Here's a short example: $album = "Lock, Stock & Two Smoking Barrels" GuiCreate("test", 600, 210) $abc = GUICtrlCreateLabel ($album, 20, 80, 400, 80) GUISetState() MsgBox(4096,'debug:' , '$album:' & $album) While 1 Sleep (100) WEnd The label created with GUICtrlCreateLabel shows: Lock, Stock_Two Smoking Barrels The message window shows the correct: Lock, Stock & Two Smoking Barrels When I replace "&" with "&&" in the string it shows one "&" in the label. Can aynone please explain why this happens? Using v3.1.1 by the way Thanks
  9. I'm getting there: $myInDesign.Select ($Frame, True) This line selects at least the last created empty text frame, although it's supposed to add all empty text frames. But I'm getting closer A completely unrelated question: I'm using Scite for coding and with the VBS stuff I'm always get an error message popup when I hit F5. The code is still working it just doesn't like this line: ...ERROR: ObjCreate(): undefined function. $MyIndesign = ObjCreate("InDesign.Application.2.0") You don't know by any chance how to turn off the error messages in Scite? I just couldn't find an option for that. Thanks
  10. Yes, that's working. Thanks again!
  11. Hi SolidSnak, maybe you can help me with that. This is the VBS code: mySelection.Move = Array($myX1, $myY2_store) Now I'm not quite sure what to do with this array: $mySelection.Move = ??? Any idea how to write that in AutoIt? Thanks
  12. Thank you so much SolidSnake! Apart from line it's all working so far. But I'm sure we can figure that out as well. This also gives me an idea of how things work with VBS in AutoIt. Wow, that'll open whole new possibilities for my InDesign scripts! Finally I can turn all my script ideas into reality
  13. Hi there, I'm writing a lot of scripts in VBScript for Adobe InDesign 2. For scripting everything else I always use AutoIt . Now I was wondering if it's possible to use VBScript in AutoIt to access InDesign but also make use of all the other AutoIt features like GUI etc. I'm not a real programmer but I already read a lot about the COM support in the latest help file and in the forum. Also the postings about how to use VBScript in AutoIt sound very promising, although I'm still not sure if it can be done what I'm looking for. I thought the best way would be probably to post this little InDesign VBscript as an example and someone might be able to tell me if this is possible through AutoIt or not. Thanks very much in advance! Dim MyIndesign Set MyIndesign = CreateObject("InDesign.Application.2.0") Set myDocument = myInDesign.ActiveDocument Set myLayers = mydocument.Layers For Each Layer In myLayers Layer.Locked = False Layer.Visible = True Next SelectionCount = 0 Set MySelectionRange = myInDesign.Activewindow.ActiveSpread For Each Frame In MySelectionRange.TextFrames If Frame.Characters.Count = 0 Then myInDesign.Select Frame, True SelectionCount = SelectionCount + 1 End If Next If SelectionCount > 0 Then MsgBox (SelectionCount & " empty Text Frames found and selected") Else MsgBox ("No empty Text Frames found") End If
  14. Hi, I had a similar problem once with a file which I couldn't delete because it was used by some strange process. I managed to figure out which one it was with the help of Process Explorer (http://www.sysinternals.com/ntw2k/freeware/procexp.shtml). That way I could kill the process and delete the file. Just like you I tried really everyhting else before that with no luck. Hope this helps Alex
  15. That's a great little script. It will be very useful in my everyday work. Since I'm still a newbie when it comes to programming and AuoIT I have a question about the two marked lines below. Do I really need them? It seems to work correctly without. Sorry if this is a very basic question or the wrong forum for that. I'm just trying to understand the script. Maybe I should look at it tomorrow again - it's too late anyway Thanks for any reply and for sharing this script with us While 1 $clip = ClipGet() If $last <> $clip Then GUICtrlSetData($combo, $clip) $msg = GUIGetMsg() Select Case $msg = $combo ClipPut(GUIRead($combo)) $last = ClipGet() <=== $clip = ClipGet() <=== EndSelect Sleep(10) $last = $clip Wend
×
×
  • Create New...