SHARE
TWEET

Untitled

a guest Oct 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %% // import the .NET assembly and define helper function
  2. NET.addAssembly('System.Windows.Forms');
  3. sendkey = @(strkey) System.Windows.Forms.SendKeys.SendWait(strkey) ;
  4.  
  5. %% // prepare a few things to send to FEAP
  6. str1 = 'y' ;
  7. str2='exit';
  8. str3='n';
  9. tic
  10. system('feap0719 &') ;   %// Start FEAP, without matlab waiting for the return value
  11. sendkey(str1)           %// send a full string to the notepad
  12. sendkey('{ENTER}');     %// send the {ENTER} key
  13. i=0;
  14. sstr=('feap0719.exe');
  15.  mat=importdata('proclst.txt');
  16.  
  17.  
  18.    
  19. while i<10000
  20.     i=i+1;
  21.     system('makelist.bat');
  22.     mat=importdata('proclst.txt');
  23.     for jj=1:1:size(mat,1)
  24.         sstr1(:,1)=sstr;
  25.     end
  26.    tr=strcmp(mat{jj,1}(1:12),sstr(:));
  27.    if sum(tr,2)>=1
  28.         continue
  29.    else
  30.       break
  31.       continue
  32.    end
  33. end
  34.  
  35. % system('del.bat')
  36. toc% if isempty(cmdout)== 1
  37. %     sendkey(str2)           %// send a full string to the notepad
  38. % sendkey('{ENTER}');
  39. % sendkey(str3)           %// send a full string to the notepad
  40. % sendkey('{ENTER}');
  41. % end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top